openHPI / m.e.i.n.e.l

Modern, Extensible and Interactive Number Exploration Library (or short: m.e.i.n.e.l)

Home Page:https://openhpi.github.io/m.e.i.n.e.l/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

look deeper into d3.select()

MaximilianV opened this issue · comments

There might be a problem, as d3 seems to search the complete site for the wanted div/id and not the local/shadow dom of the polymer element.
This will cause problems when using multiple components on the same site, using the same div identifiers.

you can get the specific element out of the shadow dom with this.$.myId

Addressed this in 5257e4a.
A solution is to do a d3.select() on a diagram-wrapping element from the local DOM first before proceeding to select an SVG element (look for diagramDiv in the commit for reference).