Skip to main content

expandItem()

shows all children of the target shape or expands the group/swimlane

expandItem(id: Id, dir?: TreeDirection): void;

Parameters:

  • id: string | number - the id of the item
  • dir: string - optional, defines the side the children will be shown in relation to the root shape: "left", "right"

Example

diagram.expandItem(123);

Note, that the dir parameter can be used only in the diagram that is initialized in the mindmap mode (type:"mindmap").

const diagram = new dhx.Diagram("diagram_container", {
type:"mindmap"
});
diagram.parse(data);

diagram.expandItem("main", "left");

Change log:

The dir parameter was added in v3.1.

Expanding/collapsing items