I’ve been trying to achieve an automatic layout that wraps to the next line based off of the maximum viewport of the gojs diagram. On paper, the serpentine layout would’ve worked great, until there are 2 nodes connected to a single node. Then it causes overlaps. For example:
I was able to modify the serpentine code to not alternate from left to right when starting a new line; however I could not figure out how to ensure nodes do not overlap.
The TreeLayout, outputs outcomes we want, but does not automatically wrap the diagram based off the maximum viewport like the Serpentine diagram does:
I was able to find
myDiagram.autoScale = Diagram.Uniform but this just zooms the graph to fit the viewport and does not wrap. If the view port gets small, everything is scaled smaller.
Is there a way to achieve TreeLayout with wrapping from Serpentine? or Serpentine with TreeLayout’s ability to not overlap nodes?