Closed Githamza closed 5 years ago
You should to remove a connections using NodeEditor as it works with the view layer (Node instance, Output/Input dont have access to view layer)
node.outputs.forEach(output => {
output.connections.map(connection => editor.removeConnection(connection))
})
Nice that's working. I would like to know how to use removeConnections? ( all connections of a node )
@Githamza it doesn't work combined with the view
My question is, If the user removes any connection in the code how to know which connection is removed? so I can update connections.
@lomtesaurabh v1 or v2?
for v1 you can listen to connectionremoved
event like this:
editor.on('connectionremoved', args =>{})
I'm trying to delete connection programmatically .
Here my code
in my node output variable object connection is get removed. but in UI connection is still there.
Should I trigger a function in engine or editor to make the editor applying delete to UI ?