iVis-at-Bilkent / cytoscape.js-undo-redo

A Cytoscape.js extension to provide an undo-redo framework
MIT License
46 stars 9 forks source link

Undo of move nodes is not working when cy instance is reloaded #3

Closed metincansiper closed 8 years ago

metincansiper commented 8 years ago

Please see the following issue 'https://github.com/iVis-at-Bilkent/sbgnviz-js/issues/155'. I think that this issue is not application specific. I think that it is caused by the following reason. When a new cy instance is loaded old cy events are removed (I am not sure but it seems to be so) and they are needed to be redefined. However, 'isInitialized' flag in this extension keeps its old value. And if this flag is true the default "setDragUndo()" is not called and so the things to be done on "mousedown", "mouseup" etc. are not redefined by this extension.

selimfirat commented 8 years ago

After the commit above, it seems fixed (in sbgn-viz too). I also published to npm.

metincansiper commented 8 years ago

Thanks, it seems to be fixed.