| 110 | } |
| 111 | |
| 112 | override async didApply({ updateHistory = true, updateState = true } = {}): Promise<ActionApplyResult> { |
| 113 | if (updateHistory === true) { |
| 114 | (this.engine.history('image') as string[]).push(this._statement as string); |
| 115 | } |
| 116 | |
| 117 | if (updateState === true) { |
| 118 | this.engine.state({ |
| 119 | images: [...this.engine.state('images'), this._statement as string] |
| 120 | }); |
| 121 | } |
| 122 | return { advance: true }; |
| 123 | } |
| 124 | |
| 125 | override async revert(): Promise<void> { |
| 126 | this.engine.element().find(`[data-image="${this.asset}"]`).remove(); |