Hi,
So for my use case, I have to render very large layouts. The nodeDataArray is generated by parsing code into tokens. What I want is to lay out the generated nodes in a nice, grid format inside a parent container (a group). There are two things that I wish to ask here:
-
I would be setting a fixed width for my parent container, laying it out as a grid structure based on positions, with maximum 4 nodes per row. I want to be able to control where these nodes are placed by setting a property for each node object in the nodeDataArray. So for example, the node with position 1 would occupy the very first position in the first row, and the node with position 6 would occupy the second position in the second row. In short, I want gojs to read these position properties set by me in each node object and position these nodes accordingly when I generate a graphLinksModel from my nodeDataArray. How can I achieve such a thing?
-
Secondly, since I am creating these layouts on the backend and then sending them to the front-end to be rendered (I bind location property property for each node with the location in the templates that I define on front-end), I want my nodes to have their location properties set relative to their parent containers. So imagine a container placed at (100,100). The first child inside that container should have the location (0,0), which means that it is placed at the top-left corner of its parent container. How can I achieve this?