collapseItem

hides all children of the target shape or collapses the group/swimlane

void collapseItem(string|number id,string dir);

Parameters

idstring|numberthe id of the item
dirstringoptional, defines the side the children will be hidden in relation to the parent shape: "left", "right"

Example

diagram.collapseItem(123);

Details

Note, that the dir attribute can be used only in Mind Maps (type:"mindmap").

var diagram = new dhx.Diagram("diagram_container", {
    type:"mindmap"
});
diagram.parse(data);
 
diagram.collapseItem("main", "left");
See also
Change log

The dir parameter was added in v3.1.

Back to top