expandItem

shows all children of the target shape

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

Parameters

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

Example

diagram.expandItem(123);

Details

The method won't work in dhtmlxDiagram with the type:"default" but will work with type:"org" or type:"mindmap".

Also 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.expandItem("main", "left");
See also
Change log

The dir parameter was added in v3.1.

Back to top