getId()
Description
Returns the id of the selected item
Usage
getId(): string | number;
Returns
The method returns the id of the selected item
Example
// diagram must be created with the "select:true" option
const diagram = new dhx.Diagram("diagram_container", {
select: true
});
diagram.data.parse(data);
const id = diagram.selection.getId(); // -> "2"
Related articles:
Related samples: