UNPKG

gojs

Version:

Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams

28 lines 1.06 kB
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Serpentine Layout</title> <!-- Copyright 1998-2017 by Northwoods Software Corporation. --> <meta charset="UTF-8"> <script src="../assets/js/goSamples.js"></script> <!-- this is only for the GoJS Samples framework --> </head> <body> <div id="sample"> <div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:500px; min-width: 200px"></div> <p> 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 <a href="SerpentineLayout.js">SerpentineLayout.js</a>. </p> <p> It also has <a>Layout.isViewportSized</a> set to true, so that resizing the Diagram DIV will automatically re-layout. </p> </div> <script src="http://gojs.net/latest/samples/assets/require.js"></script> <script> require(["SerpentineScript"], function (app) { app.init(); }); </script> </body> </html>