expandItem()
Description
Shows all children of the target shape or expands the group/swimlane
Usage
expandItem(
id: string | number,
dir?: string
): void;
Parameters
id
- (required) the ID of the itemdir
- (optional) defines the side the children will be shown in relation to the root shape: "left", "right"noteThe dir parameter can be used only when the diagram is initialized in the mindmap mode (type:"mindmap")
Example
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
diagram.data.parse(data);
diagram.expandItem(123);
or
const diagram = new dhx.Diagram("diagram_container", {
type:"mindmap"
});
diagram.data.parse(data);
diagram.expandItem("main", "left");
Change log: The dir parameter was added in v3.1
Related articles: Expanding/collapsing items