open-source-labs / Svelvet

๐ŸŽ› A Svelte library for building dynamic, infinitely customizable node-based user interfaces and flowcharts
https://svelvet.io
2.58k stars 166 forks source link

Edges appending to only one instance of Svelvet container #513

Open gonzaloaune opened 3 months ago

gonzaloaune commented 3 months ago

Description

If you have more than one Svelvet app container and you have Edges on your Nodes, the Edges are only appended to the first instance of the Svelvet app due to this line https://github.com/open-source-labs/Svelvet/blob/bd69dc3c6b0393569fe62caa766928c90065905a/src/lib/components/Edge/Edge.svelte#L20

Reproduction

https://stackblitz.com/edit/vitejs-vite-3df9v8?file=package.json,src%2FApp.svelte

1) Create 2 instances of Svelvet apps with Edges, Anchors and Nodes 2) See the first one will have double the Edges 3) See the subsequent instances of Svelvet apps not drawing the Edges

System information

svelte: ^4.2.12 => 4.2.12
svelte-loader: ^3.2.0 => 3.2.0
svelvet: 10.0.2 => 10.0.2

Additional information

No response

๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

Khaalid-oh commented 3 months ago

Hi @gonzaloaune I can help with this

Khaalid-oh commented 3 months ago

I can't seem to reach you on sphinx chat. This is my sphinx id on the community @Saif

turizspace commented 3 months ago

515

aliraza556 commented 3 months ago

HI @gonzaloaune, this issue is available then please assign me?