()
| 664 | } |
| 665 | |
| 666 | public undo() { |
| 667 | const historyIndex = this.state.historyIndex - 1; |
| 668 | if (historyIndex < 0) return; |
| 669 | const newState = this.replay(historyIndex); |
| 670 | this.rebaseFilter = true; |
| 671 | this.setState({ ...newState as State, historyIndex }); |
| 672 | } |
| 673 | |
| 674 | public redo(historyIndex = this.state.historyIndex + 1) { |
| 675 | if (historyIndex >= this.state.historyItems.length) return; |