pycodestyle
pycodestyle copied to clipboard
Global method for connecting nodes/anchors & expose `connect`/`disconnect` for `Anchor` as well
Love the fact that now we can use connect & disconnect to programmatically connect nodes! Two doubts
- I guess it'd be great if we can also expose these methods from Anchors as well? Since they accept
connectionsobject too - I guess there was a mention of a global method as well for
connect&disconnectbut i cant seem to find it, it'd be great to have that too
Need to think through the global method before implementing and haven't had the time yet. Should get to it this week.
Need to think through the global method before implementing and haven't had the time yet. Should get to it this week.
Sure thing! Happy to give any inputs if required.
Also what about point 1? I guess exposing let:connect from Anchor would be great as well
Hey @briangregoryholmes ! Just wanted to know if this is possible now.
The release cycle will be slowing down as the the team focuses on the next major version. This will absolutely be a part of that. I'll keep you posted.
The release cycle will be slowing down as the the team focuses on the next major version. This will absolutely be a part of that. I'll keep you posted.
Sure sure, thanks for the update!
Hey @briangregoryholmes now that 8.0 is about, is it possible to connect anchors via a function?
I'm currently trying to restrict which inputs and outputs can connect. Essentially red-to-blue, green-to-yellow. And the ability to disconnect anchors from each other in the onConnected event would be nice.
UPD: Found a way:
<script lang="ts">
let svelvet: Svelvet;
</script>
<Svelvet bind:this={svelvet}>
and then
svelvet.disconnect(["sourceNodeId", "sourceAnchorId"], ["targetNodeId", "targetAnchorId"]);
is there a similar connect function too?
is there a similar connect function too?
Yes