jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.42k stars 714 forks source link

How to disable the creation of connections by dragging? #740

Closed matheusfnl closed 11 months ago

matheusfnl commented 11 months ago

I want to disable this feature, i tried editor.editor_mode = 'fixed', but this disables the node drag-and-drop

disablepls

jerosoler commented 11 months ago

Hi,

Disable drawconnection function:

editor.drawConnection = function() {
  return false;
}
jerosoler commented 11 months ago

More simple and not errors in console javascript:

editor.on("mouseMove", ({x,y}) => {
  editor.connection = false;
});
matheusfnl commented 11 months ago

Thank you!