Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawflow changes layout when drag a specific node #880

Open
heziosight opened this issue Jun 27, 2024 · 4 comments
Open

Drawflow changes layout when drag a specific node #880

heziosight opened this issue Jun 27, 2024 · 4 comments

Comments

@heziosight
Copy link

heziosight commented Jun 27, 2024

Hello,
when i'm click to drag and change position of specific node , drawflow change his layout and just when i release the click , then node ability to move.
i found that when i drag the node by right mouse click that's actually works fine. but left mouse key also moved canvas.
how i can prevent canvas while dragging a node and make it works also with left mouse key?
i attached sample video
how i can fix that?

0785469a-a93a-4162-ae15-20b26b74a89a.mp4
@jerosoler
Copy link
Owner

Can you provide a codepen where the error is reproduced?
Some of your CSS classes may be changing the behavior of drawflow. Review them.

@heziosight
Copy link
Author

actually there's no error , i just can't understand this behavior. why long press on node with the left mouse button move also drawflow layout? there's option to disable it somehow?

@jerosoler
Copy link
Owner

@heziosight
Copy link
Author

heziosight commented Jun 27, 2024

i tried that's not work bro , i got Property 'editor_selected' does not exist on type 'Drawflow'.
i also tried to add some logic to disable canvas dragging by setting editor mode to fixed

  this.editor.on('click', () => {
  this.editor.editor_mode = 'fixed';
 });

this.editor.on('clickEnd', () => {
  this.editor.editor_mode = 'edit';
});

but unfortunately that's just freeze my drawflow canvas without option to drag any node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants