-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG icons with IDs do not work #514
Comments
@lamberski Thanks for the repro demo, this issue is similar to #508 I'll be investigating this, but is not a high priority at the moment. Pull requests welcomed :) |
I've investigated this issue a little bit, and I have an idea of what is happening. When the SVG circle uses When the However, when the @DonNicoJs I've found that replacing the There's also the question of whether or not we'd update all of the other places that In the meantime, I don't know if you're still interested in a solution to this after all these months @lamberski , but a work-around with the existing library is to define and include the gradient as a separate component from the icon definition: https://codesandbox.io/s/focused-ptolemy-xck5b?file=/src/components/Map.vue |
@mikeu I think your approach works! we just need to verify that we do not take a performance hit ( but I think is not the case ) |
@DonNicoJs yep, I can take care of that at some point soon! What are your thoughts on whether I should expand it to include other components that currently use |
@mikeu let's try to expand and see if the performance is the same! |
Description
I'm using SVG icons inside
<l-icon>
. I have linear<linearGradient>
withid="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
<icon />
component from above the map to see that icon inside map does not have gradient.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
Versions
The text was updated successfully, but these errors were encountered: