1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8"/>
|
5 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover"/>
|
6 | <meta name="description" content="GoJS in 12 Minutes Video Code."/>
|
7 | <link rel="stylesheet" href="../assets/css/style.css"/>
|
8 | <title> GoJS in 12 Minutes Video Code </title>
|
9 | <link rel="stylesheet" href="../assets/css/prism.css" />
|
10 |
|
11 | <script src="../release/go.js"></script>
|
12 | </head>
|
13 | <body>
|
14 | <nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary">
|
15 | <div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2">
|
16 | <div class="md:pl-4">
|
17 | <a class="text-white hover:text-white no-underline hover:no-underline
|
18 | font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary " href="../">
|
19 | <h1 class="mb-0 p-1 ">GoJS</h1>
|
20 | </a>
|
21 | </div>
|
22 | <button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation">
|
23 | <svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6">
|
24 | <path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path>
|
25 | <path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
|
26 | </svg>
|
27 | </button>
|
28 | <div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20">
|
29 | <ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0">
|
30 | <li class="p-1 sm:p-0"><a class="topnav-link" href="../learn/">Learn</a></li>
|
31 | <li class="p-1 sm:p-0"><a class="topnav-link" href="../samples/">Samples</a></li>
|
32 | <li class="p-1 sm:p-0"><a class="topnav-link" href="../intro/">Intro</a></li>
|
33 | <li class="p-1 sm:p-0"><a class="topnav-link" href="../api/">API</a></li>
|
34 | <li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li>
|
35 | <li class="p-1 sm:p-0"><a class="topnav-link" href="../download.html">Download</a></li>
|
36 | <li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li>
|
37 | <li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html"
|
38 | target="_blank" rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/contact.html', 'contact');">Contact</a></li>
|
39 | <li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html"
|
40 | target="_blank" rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/sales/index.html', 'buy');">Buy</a></li>
|
41 | </ul>
|
42 | </div>
|
43 | </div>
|
44 | <hr class="border-b border-gray-600 opacity-50 my-0 py-0" />
|
45 | </nav>
|
46 |
|
47 | <div class="md:flex flex-col md:flex-row md:min-h-screen w-full max-w-screen-xl mx-auto">
|
48 |
|
49 | <div id="navSide" class="flex flex-col w-full md:w-40 lg:w-48 text-gray-700 bg-white flex-shrink-0">
|
50 | <div class="flex-shrink-0 px-8 py-4">
|
51 | <button id="navButton" class="rounded-lg md:hidden focus:outline-none focus:ring" aria-label="Navigation">
|
52 | <svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6">
|
53 | <path id="navOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path>
|
54 | <path id="navClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
|
55 | </svg>
|
56 | </button>
|
57 | </div>
|
58 | <nav id="navList" class="min-h-screen hidden md:block sidebar-nav flex-grow px-1 lg:px-4 pb-4 md:pb-0 md:overflow-y-auto break-words">
|
59 | <a href="../learn/index.html">Get Started</a>
|
60 | <a href="../learn/graphObject.html">Manipulating GraphObjects</a>
|
61 | <a href="../learn/interactivity.html">Interacting with Diagrams</a>
|
62 | </nav>
|
63 | </div>
|
64 | <div class="pt-4 px-2 md:px-0 lg:px-4 pb-16 w-full overflow-hidden">
|
65 |
|
66 | <h1>GoJS in 12 Minutes Video Code</h1>
|
67 |
|
68 | <p>Link to video <a href="https://www.youtube.com/watch?v=7cfHF7yAoJE">here</a>.</p>
|
69 |
|
70 | <pre class="lang-js"><code>
|
71 | var $ = go.GraphObject.make;
|
72 | myDiagram = $(go.Diagram, "myDiagramDiv");
|
73 | var nodeDataArray = [
|
74 | { key: "Alpha", color: "lime" },
|
75 | { key: "Beta", color: "cyan" },
|
76 | { key: "Zeta", isGroup: true },
|
77 | { key: "Delta", color: "pink", group: "Zeta" },
|
78 | { key: "Gamma", color: "maroon", group: "Zeta" }
|
79 | ];
|
80 | var linkDataArray = [
|
81 | { to: "Beta", from: "Alpha", color: "red" },
|
82 | { to: "Zeta", from: "Alpha" }
|
83 | ];
|
84 | myDiagram.model = new go.GraphLinksModel(nodeDataArray, linkDataArray);
|
85 |
|
86 | myDiagram.nodeTemplate =
|
87 | $(go.Node, "Auto",
|
88 | $(go.Shape, "RoundedRectangle", { fill: "white", },
|
89 | new go.Binding("fill", "color")
|
90 | ),
|
91 | $(go.TextBlock, "text", { margin: 10 },
|
92 | new go.Binding("text", "key")
|
93 | )
|
94 | );
|
95 |
|
96 | myDiagram.linkTemplate =
|
97 | $(go.Link,
|
98 | $(go.Shape, { strokeWidth: 3 },
|
99 | new go.Binding("stroke", "color")),
|
100 | $(go.Shape,
|
101 | { toArrow: "Standard", stroke: null },
|
102 | new go.Binding("fill", "color"))
|
103 | );
|
104 | </code></pre>
|
105 |
|
106 |
|
107 | <div id="myDiagramDiv" class="diagramStyling" style="width:700px; height:150px"></div>
|
108 | <script>
|
109 | function setupDiagram(divname) {
|
110 | var $ = go.GraphObject.make;
|
111 | myDiagram = $(go.Diagram, "myDiagramDiv");
|
112 | var nodeDataArray = [
|
113 | { key: "Alpha", color: "lime" },
|
114 | { key: "Beta", color: "cyan" },
|
115 | { key: "Zeta", isGroup: true },
|
116 | { key: "Delta", color: "pink", group: "Zeta" },
|
117 | { key: "Gamma", color: "maroon", group: "Zeta" }
|
118 | ];
|
119 | var linkDataArray = [
|
120 | { to: "Beta", from: "Alpha", color: "red" },
|
121 | { to: "Zeta", from: "Alpha" }
|
122 | ];
|
123 | myDiagram.model = new go.GraphLinksModel(nodeDataArray, linkDataArray);
|
124 |
|
125 | myDiagram.nodeTemplate =
|
126 | $(go.Node, "Auto",
|
127 | $(go.Shape, "RoundedRectangle", { fill: "white", },
|
128 | new go.Binding("fill", "color")
|
129 | ),
|
130 | $(go.TextBlock, "text", { margin: 10 },
|
131 | new go.Binding("text", "key")
|
132 | )
|
133 | );
|
134 |
|
135 | myDiagram.linkTemplate =
|
136 | $(go.Link,
|
137 | $(go.Shape, { strokeWidth: 3 },
|
138 | new go.Binding("stroke", "color")),
|
139 | $(go.Shape,
|
140 | { toArrow: "Standard", stroke: null },
|
141 | new go.Binding("fill", "color"))
|
142 | );
|
143 | return myDiagram;
|
144 | }
|
145 | setupDiagram("myDiagramDiv")
|
146 | </script>
|
147 | </div>
|
148 | </div>
|
149 |
|
150 | <div class="bg-nwoods-primary">
|
151 | <section class="max-w-screen-lg text-white container mx-auto py-2 px-12">
|
152 | <p id="version" class="leading-none mb-2 my-4">GoJS</p>
|
153 | </section>
|
154 | </div><footer class="bg-nwoods-primary text-white">
|
155 | <div class="container max-w-screen-lg mx-auto px-8">
|
156 | <div class="w-full py-6">
|
157 |
|
158 | <div class="max-w-screen-lg xl:max-w-screen-xl mx-auto px-4 sm:px-6 md:px-8">
|
159 | <ul class="text-sm font-medium pb-14 sm:pb-20 grid grid-cols-1 sm:grid-cols-3 gap-y-10">
|
160 | <li class="list-none row-span-2">
|
161 | <h2 class="text-base font-semibold tracking-wide">GoJS</h2>
|
162 | <ul class="list-none space-y-4 md:space-y-1 px-0">
|
163 | <li>
|
164 | <a href="../samples/index.html">Samples</a>
|
165 | </li>
|
166 | <li>
|
167 | <a href="../learn/index.html">Learn</a>
|
168 | </li>
|
169 | <li>
|
170 | <a href="../intro/index.html">Intro</a>
|
171 | </li>
|
172 | <li>
|
173 | <a href="../api/index.html">API</a>
|
174 | </li>
|
175 | <li>
|
176 | <a href="../changelog.html">Changelog</a>
|
177 | </li>
|
178 | <li>
|
179 | <a href="https://github.com/NorthwoodsSoftware/GoJS">GitHub</a>
|
180 | </li>
|
181 | </ul>
|
182 | </li>
|
183 | <li class="list-none row-span-2">
|
184 | <h2 class="text-base font-semibold tracking-wide">Support</h2>
|
185 | <ul class="list-none space-y-4 md:space-y-1 px-0">
|
186 | <li>
|
187 | <a href="https://www.nwoods.com/contact.html"
|
188 | target="_blank" rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/contact.html', 'contact');">Contact</a>
|
189 | </li>
|
190 | <li>
|
191 | <a href="https://forum.nwoods.com/c/gojs">Forum</a>
|
192 | </li>
|
193 | <li>
|
194 | <a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a>
|
195 | </li>
|
196 | <li>
|
197 | <a href="https://www.nwoods.com/sales/index.html"
|
198 | target="_blank" rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/sales/index.html', 'buy');">Buy</a>
|
199 | </li>
|
200 | <li>
|
201 | <a href="https://www.youtube.com/channel/UC9We8EoX596-6XFjJDtZIDg">Videos</a>
|
202 | </li>
|
203 | </ul>
|
204 | </li>
|
205 | <li class="list-none row-span-2">
|
206 | <h2 class="text-base font-semibold tracking-wide">Company</h2>
|
207 | <ul class="list-none space-y-4 md:space-y-1 px-0">
|
208 | <li>
|
209 | <a href="https://www.nwoods.com">Northwoods</a>
|
210 | </li>
|
211 | <li>
|
212 | <a href="https://www.nwoods.com/about.html">About Us</a>
|
213 | </li>
|
214 | <li>
|
215 | <a href="https://www.nwoods.com/contact.html">Contact Us</a>
|
216 | </li>
|
217 | <li>
|
218 | <a href="https://twitter.com/northwoodsgo">Twitter</a>
|
219 | </li>
|
220 |
|
221 | </ul>
|
222 | </li>
|
223 | </ul>
|
224 |
|
225 |
|
226 | <p class="text-sm text-gray-100 md:mb-6">
|
227 | Copyright 1998-2021 <a class="text-white" href="https://www.nwoods.com">Northwoods Software</a>
|
228 | </p>
|
229 | </div>
|
230 | </div>
|
231 | </footer> </body>
|
232 |
|
233 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-1506307-5"></script>
|
234 | <script>
|
235 | window.dataLayer = window.dataLayer || [];
|
236 | function gtag(){dataLayer.push(arguments);}
|
237 | gtag('js', new Date()); gtag('config', 'UA-1506307-5');
|
238 | var getOutboundLink = function(url, label) {
|
239 | gtag('event', 'click', {
|
240 | 'event_category': 'outbound',
|
241 | 'event_label': label,
|
242 | 'transport_type': 'beacon'
|
243 | });
|
244 | }
|
245 |
|
246 |
|
247 | var topButton = document.getElementById("topnavButton");
|
248 | var topnavList = document.getElementById("topnavList");
|
249 | topButton.addEventListener("click", function() {
|
250 | this.classList.toggle("active");
|
251 | topnavList.classList.toggle("hidden");
|
252 | document.getElementById("topnavOpen").classList.toggle("hidden");
|
253 | document.getElementById("topnavClosed").classList.toggle("hidden");
|
254 | });
|
255 | </script>
|
256 | <script src="../assets/js/prism.js"></script>
|
257 | <script src="../assets/js/goDoc.js"></script>
|
258 | <script>
|
259 | document.addEventListener("DOMContentLoaded", function() {
|
260 | if (window.go) document.getElementById('version').textContent = "GoJS version " + go.version;
|
261 | if (window.goDoc) window.goDoc();
|
262 | });
|
263 | </script>
|
264 | </html> |
\ | No newline at end of file |