Wiki
Clone wikiTree Visualization API / translate
Operator.js
connectTo | fill | order | reshape | rotate | scale | setStrokeColor | setStrokeWidth | slice | squarify | strip | translate |
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