MCPcopy Index your code
hub / github.com/devforth/painterro / undoState

Method undoState

js/worklog.js:100–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 }
99
100 undoState() {
101 if (this.current.prev !== null) {
102 let currentToolName = this.current.activeToolName;
103 this.current = this.current.prev;
104 this.applyState(this.current);
105 this.changed(false);
106 if (currentToolName) {
107 this.main.closeActiveTool(true);
108 this.main.setActiveTool(this.main.toolByName[currentToolName])
109 } else {
110 this.main.closeActiveTool();
111 }
112
113 if (this.main.params.onUndo) {
114 this.main.params.onUndo(this.current);
115 }
116 }
117 }
118
119 redoState() {
120 if (this.current.next !== null) {

Callers 3

cancelPlacingMethod · 0.80
constructorMethod · 0.80
initEventHandlersMethod · 0.80

Calls 4

applyStateMethod · 0.95
changedMethod · 0.95
closeActiveToolMethod · 0.80
setActiveToolMethod · 0.80

Tested by

no test coverage detected