Light High Efficiency Graph Component
en

Qunee Developer Guide

Node Position

Property of node position

Anchor position

Example

The node at same position and different anchors

var node = graph.createNode("Right");
node.anchorPosition = Q.Position.LEFT_TOP;
node = graph.createNode("Left");
node.anchorPosition = Q.Position.RIGHT_TOP;
node = graph.createNode("TOP");
node.anchorPosition = Q.Position.CENTER_BOTTOM;

Operation effect:

Example

Create nodes, and set appointed position, rotate angle and anchor position

var defaultNode = graph.createNode("Default Node");
var node = graph.createNode("Node");
node.location = new Q.Point(100, 100);
node.rotate = Math.PI / 3;
node.anchorPosition = Q.Position.LEFT_TOP;

Operation effect: