Skip to main content

Selection overview

A set of APIs that you can use when working with selection of the Diagram items. The API is available both in the diagram and in the editor.


add()Adds the specified item into the selection list
clear()Clears the selection list without invoking events
getIds()Returns the list of ids of selected items
getItem()Returns the object of the specified selected item or of the last selected item when called without arguments
includes()Checks whether an element is in the selection list
remove()Removes the specified item or all the items from the selection list when called without arguments


afterSelectFires after selecting an item
afterUnSelectFires after unselecting an item
beforeSelectFires on selecting an item, but before the item is really selected
beforeUnSelectFires on unselecting an item, but before the item is really unselected