How to disable changing GoJS diagram after page refreshing?

237
May 23, 2017, at 06:22 AM

My question will be simple. I'm new in GoJS diagrams building. And I have some static GoJS diagram in my web app page. 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.

Answer 1

Are you using ForceDirectedLayout? I believe that is the only standard Layout with nondeterministic behavior, due to its usage of Math.random.

If so, set http://gojs.net/latest/api/symbols/ForceDirectedLayout.html#randomNumberGenerator to null.

The general alternative is to save locations for all of the nodes and use a Binding on Node.location.

READ ALSO
Is it possible to pull a React component prop data using jQuery?

Is it possible to pull a React component prop data using jQuery?

I am building a Chrome Extension that pulls various data points from the DOMThe website that I am pulling data from was built with React and I was curious if there was a way to get prop data from the hidden React DOM using javascript running from within...

171
How do I get my red div to change background color to toggle between red and green when I click on the swap button?

How do I get my red div to change background color to toggle between red and green when I click on the swap button?

In the following code, how do I get my red div to change background color to toggle between red and green when I click on the swap button?

182
dataTable search html`s tag in a column

dataTable search html`s tag in a column

i have checkbox in my dataTablei want if a user checks it, search rows of a column for tag "span" if exists in that

170
Sort checkboxes based on their values (in specific order)

Sort checkboxes based on their values (in specific order)

I have checkboxes that are placed in a particular order by a wordpress plugin

113