ERD Diagram layout

Hey guys,

Just discovered GoJS today. I am trying to create an interactive data model using the ERD sample.
The only thing giving me trouble is that the entities are being placed in random spots after every page reload. In contrast, the sample provided seems to load the same layout every time. I combed through the code and I cannot see any differences which would explain this behaviour. If anyone could point me in the right direction I would much appreciated it.

My implementation: http://dpaste.com/1AWYGDV

If you are using ForceDirectedLayout, try setting ForceDirectedLayout.randomNumberGenerator to null.

$(go.Diagram, . . .,
  { . . .,
    layout: $(go.ForceDirectedLayout, { randomNumberGenerator: null }),
    . . .
  })
1 Like

Gracias! Worked perfectly!