Wiki

Clone wiki

Tree Visualization API / translate

Operator.js

connectTofillorderreshaperotatescalesetStrokeColorsetStrokeWidthslicesquarifystriptranslate

Function translate

Moves a Shape.

Recommended stage: INITIALIZE , PRELAYOUT, POSTLAYOUT

Function definition


translate(direction, offset, condition)       

Parameters


direction = (TOP|BOTTOM|LEFT|RIGHT) - for circle segments Y-axis = radius, X-axis = angle
offset    = number of pixels to move.
condition = Optional condition if operator is to be carried out. If left out, it is assumed TRUE

Example


//move the shape 10 pixel bottom from original position
translate(BOTTOM,10);
//move the shape 10 pixel right from original position
translate(RIGHT,10);

Updated