fires before collapsing a shape

void BeforeCollapse(string|number id,string dir){ ... };


idstring|numberthe id of a shape
dirstringthe side the children will be hidden in relation to the parent shape ("left", "right")

Example"beforeCollapse", function(id) {
    console.log("Collapsing " +, dir);
    return true;

Related samples


Returning false from the handler will block the selection.

See also
Change log

The dir parameter was added in v3.1.

Back to top