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

snapToGridDuringDrag interferes with undo/redo #43

Open
tsi opened this issue Dec 4, 2019 · 2 comments
Open

snapToGridDuringDrag interferes with undo/redo #43

tsi opened this issue Dec 4, 2019 · 2 comments

Comments

@tsi
Copy link

tsi commented Dec 4, 2019

Seems like setting snapToGridDuringDrag: true somehow messes with the undo stack of https://github.com/iVis-at-Bilkent/cytoscape.js-undo-redo

Here's what I get:

  • selected multiple elements
  • drag to move them all
  • press cmd+z to undo
  • only a single (the last) item moved back to previous position

This doesn't happen with snapToGridDuringDrag: false

Thanks!!

@canbax
Copy link
Member

canbax commented Feb 16, 2022

The real bug is not related to undo/redo. The real bug is actually "some nodes being unselected for no reason".

When snapToGridDuringDrag option is true, after moving selected items only one stays selected. They should stay selected. They do stay selected when snapToGridDuringDrag is false. Can be seen in the below screencast. In the video, for no reason, a node becomes unselected.

chrome_0Ey96FNCea.mp4

Interestingly if you delete line

"being unselected for no reason" bug is not happening. I cannot understand why.

@kubitre
Copy link

kubitre commented Feb 16, 2022

Nice timing=)

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

3 participants