projectstorm / react-diagrams

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

right click on Default Link will remove the link #1038

Open marylin13 opened 3 months ago

marylin13 commented 3 months ago

Hi, I am using the DefaultLinkWidget and set the setMaxNumberPointsPerLink=0 for engine to not create point when click on the link.

I found that when right click on the link, it remove the link , I think the related code is https://github.com/projectstorm/react-diagrams/blob/0deaec246d7fae9d3fc3e8acfaafe3576660f2f8/packages/react-diagrams-defaults/src/link/DefaultLinkSegmentWidget.tsx#L44-L49

I not sure why this is the default behavior , but in our app we does not want it. Do you mind if I make a PR to make this behavior optional or passing a customize onContextMenu function?