-
Notifications
You must be signed in to change notification settings - Fork 40
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
use unique ids #67
Comments
Please provide a reproducible example of the problem. |
Sure, if you open this in Chrome (seems to be the most reliable in showing the bug), you will see the library(svglite)
library(htmltools)
browsable(
tagList(
htmlSVG({plot(1:10,pch=10)},height=4,width=7),
htmlSVG({contour(volcano)},height=20,width=20)
)
) Deleting the |
@timelyportfolio I don't see uuid in the SVG spec. What do you mean? @hadley generating random ids seems like it would create difficulties regarding reproducibility. I think it would be better to add an argument |
@lionel- alternatively maybe we could use a simple hashing algorithm to ensure that the id is unique? There's only four values, so it shouldn't be too hard |
|
@timelyportfolio thanks! @hadley would using |
Sure, although it might be just as easy to code up something by hand, e.g. paste together the hex representation of each value (maybe coerce to float to make shorter?) |
Unfortunately, this solution does not rectify the situation. Using the same reproducible example as before, I get the same clippaths for each svg. Am I missing something? example code
replicated clippath ids |
yes there was a bug but already fixed, soon to be on master ;) |
Great thanks! |
When using mutliple svg from
svglite
in the browser, theid
forclippath
and other elements will very likely conflict. Would it be possible to useuuid
to prevent this conflict?The text was updated successfully, but these errors were encountered: