Fix pin colour

This commit is contained in:
pietervdvn 2022-02-09 01:37:08 +01:00
parent 4642e34da7
commit 9551da4e84
2 changed files with 2 additions and 18 deletions

View file

@ -89,7 +89,8 @@ export default class PointRenderingConfig extends WithContextLoader {
if (match !== null && Svg.All[match[1] + ".svg"] !== undefined) {
const svg = (Svg.All[match[1] + ".svg"] as string)
const targetColor = match[2]
const img = new Img(svg.replace(/rgb\(0%,0%,0%\)/g, targetColor), true)
const img = new Img(svg
.replace(/(rgb\(0%,0%,0%\)|#000000|#000)/g, targetColor), true)
.SetStyle(style)
if (isBadge) {
img.SetClass("badge")

View file

@ -5,27 +5,10 @@
viewBox="0 0 314 374"
version="1.1"
id="svg7"
sodipodi:docname="pin.svg"
inkscape:version="1.1.1 (1:1.1+202109281949+c3084ef5ed)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs11" />
<sodipodi:namedview
id="namedview9"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.2453722"
inkscape:cx="172.23766"
inkscape:cy="241.69481"
inkscape:current-layer="svg7" />
<path
id="path2"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 722 B