crccheck / raphael-svg-import-classic

Import SVG files to Raphael
MIT License
98 stars 40 forks source link

added data-attribute support #29

Closed plusgut closed 8 years ago

plusgut commented 8 years ago

added support for Element.data() http://raphaeljs.com/reference.html#Element.data

crccheck commented 8 years ago

looks good to me. I'd like a functional test case to verify that the data attribute gets passed on. They're written in HTML: https://github.com/crccheck/raphael-svg-import-classic/blob/master/tests/qunit.html

plusgut commented 8 years ago

actually Raphael does not persist the data-attribute inside the dom-object. But I'll have a look how they do it and try to write a test for it.

plusgut commented 8 years ago

sadly there is no option in raphael, that it persists its data-attributes. https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.js#L3491 https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.js#L3520

Because of that, I sadly can't write a html-test for it, I hope that its okay for you when there is no test for it. sorry for that.