autoPlace

enabled/disables autoplacement of blocks

void autoPlace( [string root] );
rootstringthe root to start branching from

Example

webix.ui({
  view: "diagram",
  id: "diagram1"
});
 
// disable autoplacement
$$("diagram1").autoPlace();

Details

Autoplacement is enabled by default and can be controlled during initialization via the autoplace property. The method allows autoplace blocks in run time:

$$("diagram1").autoPlace();
 
// or, with a root item id
$$("diagram1").autoPlace("blockId");

The root parameter is optional. If this parameter is not specified, Diagram will define root by itself.

See also
Back to top