1 | <!DOCTYPE html>
|
2 | <html>
|
3 | <head>
|
4 | <title>Minimal GoJS Sample</title>
|
5 |
|
6 | <meta name="description" content="An almost minimal diagram using a very simple node template and the default link template." />
|
7 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
8 |
|
9 | <script src="../samples/assets/require.js"></script>
|
10 | <script src="../assets/js/goSamples.js"></script>
|
11 |
|
12 |
|
13 | <script>
|
14 | function init() {
|
15 | require(["minimal"], function(app) {
|
16 | app.init();
|
17 | });
|
18 | }
|
19 | </script>
|
20 | </head>
|
21 | <body onload="init()">
|
22 | <div id="sample">
|
23 | |
24 |
|
25 | <div id="myDiagramDiv" style="border: solid 1px black; width:400px; height:400px"></div>
|
26 | <p>
|
27 | This isn't a truly <i>minimal</i> demonstration of <b>GoJS</b>,
|
28 | because we do specify a custom Node template, but it's pretty simple.
|
29 | The whole source for the sample is shown below if you click on the link.
|
30 | </p>
|
31 | <p>
|
32 | This sample sets the <a>Diagram.nodeTemplate</a>, with a <a>Node</a> template that data binds both the text string and the shape's fill color.
|
33 | For an overview of building your own templates and model data, see the <a href="../learn/index.html">Getting Started tutorial.</a>
|
34 | </p>
|
35 | <p>
|
36 | Using the mouse and common keyboard commands, you can pan, select, move, copy, delete, and undo/redo.
|
37 | On touch devices, use your finger to act as the mouse, and hold your finger stationary to bring up a context menu.
|
38 | The default context menu supports most of the standard commands that
|
39 | are enabled at that time for the selected object.
|
40 | </p>
|
41 | <p>
|
42 | For a more elaborate and capable sample, see the <a href="basic.html">Basic</a> sample.
|
43 | </p>
|
44 | </div>
|
45 | </body>
|
46 | </html> |
\ | No newline at end of file |