Skip to content

Instantly share code, notes, and snippets.

@anachronic
Last active November 23, 2016 14:06
Show Gist options
  • Save anachronic/07541c41c33b7681d46ab1d802298603 to your computer and use it in GitHub Desktop.
Save anachronic/07541c41c33b7681d46ab1d802298603 to your computer and use it in GitHub Desktop.
// En http://localhost:8000/sculpt.html
app._stateManager.reset()
// Pintar lo que sea
var w = app._stateManager.getUndoAndRedoStates()
// Deshacer todos los cambios
app._stateManager._redos.length = 0; app._stateManager._curUndoIndex = -1; app._stateManager._undos.length = 0;
app._stateManager.restoreFromDict(w)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment