Closed johnyb closed 11 years ago
PS: what I need for a feature, I’m planning for ffmap-d3 is to be able to select nodes … so it would be fine for now to only add this change. But IMHO it’s more clean, to have consistent ids in the json file.
Okay, I just saw, this isn’t as easy. Seems, I need to write a id_from_mac helper method or something. Will update the pull-request, soon.
Another thing, I could do is to "fix" the id as late as possible. So I could "cleanup" the ids in class D3MapBuilder. @tcatm: What do you think?
I opened another pull-request as an alternative … IMHO the second one will do and is less work on the backend. (See #2)
This attribute is used as an id for an svg element. W3C states, these ids must not start with a number (hence a prefix is added) and must not contain colons.
The advantage of this is, that nodes in a document containing elements with these ids can be selected using their id with CSS selectors. This is not possible within the current map.
I didn’t add this change for the other ids, because I didn’t know how to test this. May be you can give me a hint on this or do it yourself?