简体   繁体   English

如何在页面刷新后禁用更改GoJS图表?

[英]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.

相关问题 展开后的 GoJs 图正在更改滚动 position - GoJs Diagram after expanding is changing the scroll position 在GOJS中编辑后从图获取nodeDataArray - Get nodeDataArray from diagram after edit in GOJS 即使在刷新页面后如何存储禁用按钮的状态? - How to store state of disable button(s) even after refreshing a page? 使用GoJS initialAutoscale Diagram属性时遇到问题-它如何工作? - Trouble Using GoJS initialAutoscale Diagram Property - How Does it Work? 在 GoJS 中如何获取添加到图表中的节点的键? - How do you get the key of a node that is added to the diagram in GoJS? GoJS如何自上而下地排列调色板和图中的节点 - GoJS how can I arrange the nodes in a palette and diagram top down 如何通过复选框启用/禁用按钮并在刷新页面后保持按钮处于活动状态或非活动状态 - How to enable/disable a button via checkbox and keep the button active or inactive after refreshing the page 即使在我访问下一页或刷新上一页之后,如何保持上一页的按钮禁用 - How can I keep the button disable of previous page even after I visiting next page or after refreshing previous 使用Java脚本更改背景颜色并在刷新页面后保留 - Changing Background colour with Javascript and keeping it after refreshing the page GoJS概述中不需要的图表移动 - Unwanted diagram movement in GoJS Overview
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM