Skip to main content

remove()

unselects a previously selected item

remove(id?: Id, subId?: Id): boolean

Parameters:

  • id: string | number - optional, the item id
  • subId: string | number - optional, the id of a subheader of a swimlane or a text element of a line

Returns:

True if the item is unselected, otherwise false.

Example

diagram.selection.remove("1"); // -> true
diagram.paint();

Related samples:

note

Please note that you need to call the paint() method to repaint the diagram after removing selection.