Class TreeUndoHistoryImpl

An implementation of the TreeUndoHistory interface

Hierarchy

Constructors

Properties

_currentNode: UndoableTreeNode
_keepPath: boolean
_path: number[]
idCounter: number
redoPublisher: Subject<undefined | Undoable>
undoPublisher: Subject<undefined | Undoable>
undoableNodes: (undefined | UndoableTreeNode)[]

Accessors

  • get keepPath(): boolean
  • States whether the path of kept. If kept, users cannot delete nodes.

    Returns boolean

  • get path(): readonly number[]
  • Returns the ordered sequence of undoable's ID that the user performed. This permits to keep traces of what the users did and how they arrived to the final state.

    Returns readonly number[]

Methods

  • Deletes the targeted node. Works only if the history does not keep the usage path (see path()).

    Parameters

    • id: number

      The node ID to remove. It removes all the branch from this node. Does not remove the branch if the current node is in it.

    Returns void

Generated using TypeDoc