Description
Description
I'm using SVG icons inside <l-icon>
. I have linear <linearGradient>
with id="a"
and I'm referencing this gradient to fill a circle. When I put the icon outside the map, gradient is nicely filling the circle. When I use same icon inside the map, gradient stops working.
The strange thing is that when I put the same icon inside the map and BEFORE the map, gradient appears in both icons. When I move icon AFTER the map, both icons do not have the gradient.
Looks to me as if this gradient with id="a"
was not visible for SVG icon if its first occurence in DOM is inside the map.
I think it's related to this issue: #508 (comment).
Live Demo
https://codesandbox.io/s/hungry-bell-y2w1b
Steps to Reproduce
- Initially you see both icons have gradient.
- Remove
<icon />
component from above the map to see that icon inside map does not have gradient. - Put icon below the map to have the same result.
Expected Results
SVG icon inside the map should have linear gradient.
Actual Results
SVG icon only have gradient if there's the same icon before the map in DOM.
Browsers Affected
- Chrome
- Firefox
- Edge
- Safari 9
- Safari 8
- IE 11
Versions
- Vue: v2.6.11
- Vue2Leaflet: v2.4.2