open-source-labs / Svelvet

🎛 A Svelte library for building dynamic, infinitely customizable node-based user interfaces and flowcharts
https://svelvet.io
2.56k stars 165 forks source link

`.svelvet-graph-wrapper` selector is now relative to graph DOM elemen… #500

Closed mvarble closed 4 months ago

mvarble commented 8 months ago

When an app supports multiple windows with different Svelvet graphs, all edges appear on the first graph that shows up in the DOM. This is because inside of Edge.svelte, the function moveEdge performs a query on the entire document.

document.querySelector(`.svelvet-graph-wrapper`);

This merge request instead uses the same query selector on the DOM node that is in our component's context.