UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

20 lines (15 loc) 441 B
import { Action } from "../../../src/core/process/undo/Action.js"; class SelectionClearAction extends Action { constructor() { super(); this.oldState = null; } async apply(editor) { this.oldState = editor.selection.clone(); editor.selection.reset(); } async revert(editor) { editor.selection.copy(this.oldState); } } export default SelectionClearAction;