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

Parasitic on:connection events are firing when connections created programatically (not manually) through Anchors' props #491

Open
kkarpeev opened this issue Nov 20, 2023 · 1 comment

Comments

@kkarpeev
Copy link

Hello! There is a problem as described in topic, ver 8.
I have Nodes with Anchors (and connections) rendered inside #each block depending on data prop from outside. So when I draw connections I need to update the data. And when connections are rendered on:connection events are fired. I think, it is wrong, because we already know about components we render, but what's worse is that we cannot distinguish between events fired for already created anchor connections (by rerendering Nodes and Anchors if changed) and those we creating manually. Can't imagine a case when we need to catch on:connection for already created connections, maybe there are some, dunno.
But if you don't want to remove these firings, can you, please, at least add some flag to distinguish a manual anchor connection from a programatically created from outside?

@kkarpeev kkarpeev changed the title Parasitic on:connection events are firing on programatically (not manually) creation Node+Anchors Children in Svelvet Parasitic on:connection events are firing when connections created programatically (not manually) through Anchors' props Nov 21, 2023
@j6k4m8
Copy link

j6k4m8 commented Apr 2, 2024

Agreed — ideally this wouldn't catch programmatic edges at all, but flag is definitely a fine option!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants