This sample demonstrates a custom Layout, SerpentineLayout, which assumes the graph consists of a chain of nodes. The layout is defined in its own file, as SerpentineLayout.js.

It also has Layout.isViewportSized set to true, so that resizing the Diagram DIV will automatically re-layout.

加入 GoJS 交流群
GoJS 交流群 (769862113)