@maxgraph/core
    Preparing search index...

    Class SelectionChange

    Action to add and remove cells to/from the selection of a GraphSelectionModel.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    added: Cell[]
    removed: Cell[]

    Methods

    • Applies the change to the selection model: calls GraphSelectionModel.cellRemoved for each cell in removed, then GraphSelectionModel.cellAdded for each cell in added. Swaps added and removed so a subsequent call undoes the change, then fires InternalEvent.CHANGE on the selection model.

      WARN: because of the swap, the added and removed properties of the fired event refer to the post-swap arrays — the event's added contains the cells just removed from the selection, and vice-versa. This naming is preserved for historical reasons.

      Returns void