remove()
Description
Unselects a previously selected item
Usage
remove(
id?: string | number,
subId?: string | number
): boolean
Parameters
id
- (optional) the item idsubId
- (optional) the id of a subheader of a swimlane or a text element of a line
Returns
The method returns true
if the item is unselected, otherwise false
Example
// diagram must be created with the "select:true" option
const diagram = new dhx.Diagram("diagram_container", {
select: true
});
diagram.data.parse(data);
diagram.selection.remove("1"); // -> true
diagram.paint();
note
Please note that you need to call the paint() method to repaint the diagram after removing selection.
Related articles:
Related samples: