getItem()
Description
Returns the object of the selected item
Usage
getItem(): object;
Returns
The method returns the object of a 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 shape = diagram.selection.getItem();
// -> {id: "3", text: "Technical Director", title: "Jerry Wagner", …}
Related articles:
Related samples: