projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.45k stars 1.16k forks source link

allowLooseLinks=false config is not working as expected #944

Open Hkbm77 opened 2 years ago

Hkbm77 commented 2 years ago

In reference to the issue 322 (https://github.com/projectstorm/react-diagrams/issues/322), the config to set allowLooseLink to false doesn't work properly, we trying to restrict the loose link from the react diagram nodes, for that we set allowLooseLinks=false, its restricting the loose link to some extend but it is so sporadic that if we are trying to extend the link from the node for 3-4 times continuously the react-diagram is allowing the loose links. Is there any other way to restrict the loose links ?

if (state instanceof DefaultDiagramState) { state.dragNewLink.config.allowLooseLinks = false; }