hfg-gmuend / gmynd

A utility library for working with data in Javascript
15 stars 1 forks source link

Symbols via xlink don't work #2

Closed phlsa closed 9 years ago

phlsa commented 9 years ago

Perhaps a missing namespace or something. Couldn't figure it out right away, but this doesn't work:

createNode('use', {'xlink:href':'#other-thing', x:200, fill:'blue'});
phlsa commented 9 years ago

Turns out attributes can have their own namespace, so you have to use setAttributeNS() with the xlink namespace for the href attribute.