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

UndoAll() and RedoAll() #6

Closed gauravgrover95 closed 7 years ago

gauravgrover95 commented 7 years ago

I have used your plugin recently and it is very awesome. This "issue" is more of the feature-request instead of being an actual issue.

I think that there should be a built-in option for undoAll() and redoAll(). Although it was fairly easy to implement it by APIs already provided by this plugin by doing:

while( !isUndoStackEmpty() ) {
  ur.undo();
}

and similar it is for Redo.

Also, Please tell me why not the right thing if it's not. I am new to this whole open source and plugins stuff.

P.S. I can also create a pull request if you like the idea. :)

metincansiper commented 7 years ago

@gauravgrover95 thaks for your idea/suggestion. I added undoAll() and redoAll() to the API.

metincansiper commented 7 years ago

@gauravgrover95 If there is no problem with you we can close the issue.