-
Notifications
You must be signed in to change notification settings - Fork 535
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
in SVG export, give top layer g element id="<filename>-<layername>" #246
base: master
Are you sure you want to change the base?
Conversation
cedricsam
commented
Nov 29, 2017
- To facilitate CSS/JS-targeting using ID when layers order and complement change frequently
- Also easier to keep track of layers in Illustrator
* To facilitate targetting with ID when layers order changes frequently
What about just using the original layer names as ids in SVG output, rather than concatenating the file name with the layer name? (I think that's what I originally intended to do.) |
The reason why I'd prefer also having the file name in there was to get an Do you prefer just having the layer name because it'd be shorter and perhaps easier to see in a layer list on Illustrator? I don't feel strongly about the file name, but a layer name as the g's id would be a nice improvement. :) |
As you point out, even if you create unique layer ids, collisions could still occur between the ids of map features and other elements in a document. (This is when you're including an SVG map "inline" on a web page, as opposed to embedding as an One simple solution would be to add an option to the |
Yes, collisions will still occur. There’s also the case of when several features use the same That said, I like the idea of a |
24d0b05
to
6f7fd2c
Compare