Interface UndoableTreeNode

The interface for nodes in a tree-based history.

interface UndoableTreeNode {
    children: UndoableTreeNode[];
    id: number;
    lastChildUndone: undefined | UndoableTreeNode;
    parent: undefined | UndoableTreeNode;
    undoable: Undoable;
    visualSnapshot: UndoableSnapshot;
    redo(): void;
    undo(): void;
}

Properties

children: UndoableTreeNode[]

The children of the node.

id: number

The unique ID of the node among the tree.

lastChildUndone: undefined | UndoableTreeNode

Among the children of the node, iidentifies the one that was undone recently.

parent: undefined | UndoableTreeNode

The possible parent node.

undoable: Undoable

The undoable object contained in the node.

visualSnapshot: UndoableSnapshot

The visual snapshot of the node. Used to render the tree history.

Methods

Generated using TypeDoc