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.
Methods
| Name | Description |
|---|
| 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 |
Events
| Name | Description |
|---|
| afterSelect | Fires after selecting an item |
| afterUnSelect | Fires after unselecting an item |
| beforeSelect | Fires on selecting an item, but before the item is really selected |
| beforeUnSelect | Fires on unselecting an item, but before the item is really unselected |