[英]How to disable changing GoJS diagram after page refreshing?
My question will be simple. 我的问题很简单。 I'm new in GoJS diagrams building.
我是GoJS图表构建的新手。 And I have some static GoJS diagram in my web app page.
我的网页应用页面中有一些静态的GoJS图表。 But after I refresh page, diagram changes it's form.
但是在刷新页面之后,图表会改变它的形式。 It still consists of the same blocks I have before refreshing but it only changes the form.
它仍然包含我刷新之前的相同块,但它只更改了表单。
How could I disable it? 我怎么能禁用它? I need the same form of diagram after refreshing.
刷新后我需要相同形式的图表。
Are you using ForceDirectedLayout ? 你在使用ForceDirectedLayout吗? I believe that is the only standard Layout with nondeterministic behavior, due to its usage of Math.random .
我认为这是唯一具有非确定行为的标准布局,因为它使用了Math.random 。
If so, set http://gojs.net/latest/api/symbols/ForceDirectedLayout.html#randomNumberGenerator to null. 如果是这样,请将http://gojs.net/latest/api/symbols/ForceDirectedLayout.html#randomNumberGenerator设置为null。
The general alternative is to save locations for all of the nodes and use a Binding on Node.location . 一般的替代方法是保存所有节点的位置,并在Node.location上使用Binding。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.