I want to have "loc" value (positioning value eg. loc = "10 10") automatically calculated for statechart according to number of nodes in GOJS. Is there any specific attributes or commands to do it ?
1875 次
2 回答
2
将Diagram.layout 设置为 ForceDirectedLayout的一个实例。
所以只需将这一行添加到 StateChart.html 中的 Diagram 的初始化中:
layout: $(go.ForceDirectedLayout),
根据您希望何时发生布局,您可能有兴趣将Layout.isInitial设置为 false 和/或将Layout.isOngoing设置为 false。在“布局简介”页面上阅读更多内容。
于 2015-09-09T17:26:05.787 回答