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

When network is in addEdgeMode, dragView doesn't work #174

Closed
stevenlafl opened this issue Oct 22, 2019 · 9 comments · Fixed by #175
Closed

When network is in addEdgeMode, dragView doesn't work #174

stevenlafl opened this issue Oct 22, 2019 · 9 comments · Fixed by #175
Labels
bug Something isn't working released

Comments

@stevenlafl
Copy link

stevenlafl commented Oct 22, 2019

For my use case, I just wanted to use Network to create edges between nodes at the moment. I'll be controlling the viewport, so I don't need users to be able to drag the viewport.

interaction: {
          dragView: false,
}

does not result in the desired behavior when in addEdgeMode. This contradicts https://visjs.github.io/vis-network/docs/network/interaction.html

Linux, Chrome

@Thomaash
Copy link
Member

Hi @stevenlafl,

could you provide an MWE, please? Because if I put dragNodes: false into https://visjs.github.io/vis-network/examples/network/other/manipulation.html it works as expected.

@Thomaash
Copy link
Member

What comes to my mind is that the nodes can't be dragged but their positions are not fixed. That is if you have enabled physics the new edge will move the nodes it's connected to. To prevent this you have to use nodes.fixed: true or physics: false. This however doesn't contradict the docs so it's probably not your problem.

@stevenlafl
Copy link
Author

stevenlafl commented Oct 22, 2019

It's dragView: false, sorry. Just edited, here is the MWE https://jsbin.com/bitacuvowo

@Thomaash Thomaash added the bug Something isn't working label Oct 22, 2019
@Thomaash
Copy link
Member

That's indeed a bug. I can confirm that.

Thomaash added a commit that referenced this issue Oct 22, 2019
Formelly manipulation system reimplemented dragging instead of using
interaction to handle it. This resulted to interaction options being
ignored during edge editing and adding. Forwarding the events to
interaction handler solves these issues.

Closes #174.
@Thomaash
Copy link
Member

Could you try if https://thomaash.github.io/cdn/vis-network.5f753610cc88ac3ff0052747e9863e7f.js works properly in your project?

Thanks.

@stevenlafl
Copy link
Author

It does indeed. Thank you!

@Thomaash
Copy link
Member

Thomaash commented Oct 22, 2019

I'm glad to read that. You're welcome.

Thomaash added a commit that referenced this issue Oct 24, 2019
Formelly manipulation system reimplemented dragging instead of using
interaction to handle it. This resulted to interaction options being
ignored during edge editing and adding. Forwarding the events to
interaction handler solves these issues.

Closes #174.
@vis-bot
Copy link
Collaborator

vis-bot commented Oct 24, 2019

🎉 This issue has been resolved in version 6.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jkumar88
Copy link

jkumar88 commented Dec 20, 2021

I have same issue.
I would like to enable edge mode immediately after drawing an edge, but can't do so because a user is then unable to drag the node canvas.

Any one can help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants