Skip to main content

add

Description

Selects the specified item

Usage

add(
id: string | number,
subId?: string | number
): void;

Parameters

  • id - (required) the item id
  • subId - (optional) the id of a subheader of a swimlane or a text element of a line

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.add("2");

Related articles:

Related samples: