Wiki

Clone wiki

Tree Visualization API / rotate

Operator.js

connectTofillorderreshaperotatescalesetStrokeColorsetStrokeWidthslicesquarifystriptranslate

Function rotate

Rotates drawing area/shape around its own center.

Recommended stage: INITIALIZE , PRELAYOUT, POSTLAYOUT
If applied in INITIALIZE stage: rotate the entire drawing area for the tree
If applied in PRELAYOUT stage:rotate the specified drawing area of a level of the tree
If applied in POSTLAYOUT stage: rotate the node shape

Function definition


rotate(angle, condition)         

Parameters


angle < 0: rotate counter clockwise
angle > 0: rotate clockwise
|angle| <= 2*PI: radians assumed
|angle| > 2*PI: degrees assumed
condition = optional condition if operator is to be carried out. If left out, it is assumed TRUE


Example


Following code fragment rotate the drawing area of the entire tree 90 degree clockwise around its own centre.

INITIALIZE:
{
rotate(90);
}

this is my image

Updated