(state: IStateManager)
| 8 | ) {} |
| 9 | |
| 10 | async apply(state: IStateManager) { |
| 11 | if (!this.original) { |
| 12 | const prev = state.getOptions(); |
| 13 | this.original = {}; |
| 14 | ( |
| 15 | Object.keys(this.options) as Array<keyof UpdatableInfographicOptions> |
| 16 | ).forEach((key) => { |
| 17 | (this.original as any)[key] = prev[key]; |
| 18 | }); |
| 19 | } |
| 20 | state.updateOptions(this.options); |
| 21 | } |
| 22 | |
| 23 | async undo(state: IStateManager) { |
| 24 | if (this.original) { |
nothing calls this directly
no test coverage detected