Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edges appending to only one instance of Svelvet container #513

Open
1 task
gonzaloaune opened this issue Jul 11, 2024 · 4 comments · May be fixed by #515
Open
1 task

Edges appending to only one instance of Svelvet container #513

gonzaloaune opened this issue Jul 11, 2024 · 4 comments · May be fixed by #515
Labels
bug Something isn't working

Comments

@gonzaloaune
Copy link

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

const newContainer = document.querySelector(`.svelvet-graph-wrapper`);

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

  • 🙋‍♂️ Yes, I'd love to make a PR to fix this bug!
@gonzaloaune gonzaloaune added the bug Something isn't working label Jul 11, 2024
@Khaalid-oh
Copy link

Hi @gonzaloaune I can help with this

@Khaalid-oh
Copy link

Khaalid-oh commented Jul 13, 2024

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

turizspace added a commit to turizspace/Svelvet that referenced this issue Jul 14, 2024
…source-labs#513


    Updated moveEdge function in Edge.svelte to correctly append the edge element to its respective Svelvet container based on containerId.

🔗 Linked issue

Resolves open-source-labs#513
@turizspace
Copy link

#515

@aliraza556
Copy link

aliraza556 commented Jul 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants