inet-henge icon indicating copy to clipboard operation
inet-henge copied to clipboard

Store a fixed position in the .json file?

Open guillaumeVilar opened this issue 3 years ago • 1 comments

Hi,

I was wondering if there is a way to store fixed position inside the .json file?

If I understand correctly the positionCache option will store the position in the browser cache. I would like to store a fixed position in the json file so all the users will see the same initial diagram.

Thanks a lot for your help.

guillaumeVilar avatar Apr 17 '21 14:04 guillaumeVilar

No, we cannot define node positions in .json file currently. But I think the same .json will generate the same initial diagram as the library places nodes according to the internal rule, not randomly, does it?

If you see different initial diagrams from the same .json, we need to think about your suggestion.

A pull request will be always welcomed :)

codeout avatar Apr 20 '21 02:04 codeout