Open tsi opened 4 years ago
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.
https://user-images.githubusercontent.com/8426741/154209942-7e4358f6-dfe1-456a-a7de-9952a61fe695.mp4
Interestingly if you delete line https://github.com/iVis-at-Bilkent/cytoscape.js-grid-guide/blob/296adb1ba35295352501e5d7fc94476ebe2d4c57/src/snap_during_drag.js#L72 "being unselected for no reason" bug is not happening. I cannot understand why.
Nice timing=)
Seems like setting
snapToGridDuringDrag: true
somehow messes with the undo stack of https://github.com/iVis-at-Bilkent/cytoscape.js-undo-redoHere's what I get:
This doesn't happen with
snapToGridDuringDrag: false
Thanks!!