litegraph.js icon indicating copy to clipboard operation
litegraph.js copied to clipboard

Disable changing node connections but allow dragging and selecting

Open pabloppp opened this issue 2 years ago • 1 comments

I'd like to know if there's any way to only 'freeze' the existing connections (don't allow to add or remove new connections between nodes), but still allow the user to drag the nodes and trigger the onSelected event on them. canvas.read_only = true; seems to block everything, so I cannot select the nodes or move them around. If there is no way to do this, I'd be more than happy to submit a PR if you could point me in the right direction about where this should be changed 🙇 Thank you!

pabloppp avatar Feb 28 '23 15:02 pabloppp

Would also love this. I currently use this library as a way to visualize a program generated in another language (golang). Changing connections is forbidden, but updating constants is allowed. Disabling connection changes would be a godsend.

EliCDavis avatar Mar 20 '24 00:03 EliCDavis