Skip to main content

getSubId()

Description

Returns the subId (if any) of the selected item

Usage

getSubId(): string | number;

Returns

The method returns the subId (if any) 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 subid = diagram.selection.getSubId(); // -> "2"

Change log: Added in v4.1

Related articles: Selecting items

Related samples: