forked from NorthwoodsSoftware/GoJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminimalModule.html
More file actions
37 lines (34 loc) · 1.31 KB
/
Copy pathminimalModule.html
File metadata and controls
37 lines (34 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<title>Minimal GoJS Sample</title>
<!-- Copyright 1998-2021 by Northwoods Software Corporation. -->
<meta name="description" content="An almost minimal diagram using a very simple node template and the default link template." />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="../assets/js/goSamples.js"></script>
<!-- requires minimalModule.js, built from minimalModule.ts -->
<script type="module">
import { init } from "./minimalModule.js";
// lib needs: export const go = self.go;
window.onload = function() {
init();
}
</script>
</head>
<body>
<div id="sample">
<!-- The DIV for the Diagram needs an explicit size or else we won't see anything.
This also adds a border to help see the edges of the viewport. -->
<div id="myDiagramDiv" style="border: solid 1px black; width:400px; height:400px"></div>
<p>
This sample uses <code><script type="module"></script></code>
to import from <code>minimalModule.js</code>, which imports GoJS from <code>go.mjs</code>
</p>
<p>
In some browsers, you may need to serve this file from localhost to allow ES6 imports.
</p>
<p>
There are many more samples using <code>go.mjs</code> in the <code>../extensionsJSM</code> directory.
</p>
</body>
</html>