MCPcopy Index your code
hub / github.com/microsoft/SandDance / undo

Method undo

docs/app/js/sanddance-app.js:14244–14252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14242 });
14243 }
14244 undo() {
14245 const historyIndex = this.state.historyIndex - 1;
14246 if (historyIndex < 0) return;
14247 const newState = this.replay(historyIndex);
14248 this.rebaseFilter = true;
14249 this.setState(Object.assign(Object.assign({}, newState), {
14250 historyIndex
14251 }));
14252 }
14253 redo(historyIndex = this.state.historyIndex + 1) {
14254 if (historyIndex >= this.state.historyItems.length) return;
14255 const newState = this.replay(historyIndex);

Callers 3

renderMethod · 0.95
constructorMethod · 0.45
sanddance-app.jsFile · 0.45

Calls 1

replayMethod · 0.95

Tested by

no test coverage detected