28 lines
1016 B
HTML
28 lines
1016 B
HTML
<!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="../samples/assets/require.js"></script>
|
|
<script>
|
|
require(["SerpentineScript"], function (app) {
|
|
app.init();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |