轻量高效的拓扑图组件
zh

Qunee Developer Guide

节点跟随

节点(A)可以跟随另一个节点(B)移动而移动,这种情况下,B节点称为宿主节点,A节点称为跟随节点

示例

设置节点A跟随Host,节点B跟随A

var host = graph.createNode("Host");
var a = graph.createNode("A follow Host", -50, 50);
a.host = host;
var b = graph.createNode("B follow A", 50, 50);
b.host = a;

运行效果:

ScreenShot 2014-06-05 at 下午4.15.01.png