rete
rete copied to clipboard
Prevent dragging nodes and keep the ability to add connections
Hi, in my angular app I want to turn off dragging all nodes, but leave the ability for users to create connections between nodes. Here's my code:
area.addPipe(context => { if (context.type === 'rendered') { if (context.data.type === 'node') { context.data.element.addEventListener('pointerdown', event => event.stopPropagation()); } } return context})
What am I doing wrong? Thanks a lot!!
dragging causes the node's position change, so nodetranslate can be prevented as it is done in the readonly plugin.
https://github.com/retejs/readonly-plugin/blob/main/src/index.ts#L39 https://discord.com/channels/1081223198055604244/1156215577023627387/1156268661317828651
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.