-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
59 lines (59 loc) · 2.85 KB
/
index.html
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Dijkstra's Algorithm</title>
<script src="node_modules/noty/lib/noty.js" type="text/javascript"></script>
<script src="node_modules/leader-line/leader-line.min.js"></script>
<link rel="stylesheet" type="text/css" href="resources/stylesheets/styles.css">
<link rel="stylesheet" href="node_modules/noty/lib/noty.css">
<link rel="stylesheet" href="node_modules/noty/lib/themes/relax.css">
</head>
<body>
<div id="outerContainer">
<div id="nodesContainer" class="container">
</div>
<div id="actionsContainer" class="container">
<h1>Create node</h1>
<form id="createNodeForm">
<p><label for="nodeValue">Node text:</label> <input type="text" id="nodeValue" autocomplete="off" required>
<p><label for="size">Size:</label> <input type="number" id="size" min="40" max="400" placeholder="In pixels" required>
<p><label for="color">Color:</label> <input type="color" id="color">
<p><button type="submit" id="createNodeButton">Create node</button>
</form>
<h1>Calculate shortest path</h1>
<form id="shortestPathForm">
<p><select id="originSelect" required></select> → <select id="destinySelect" required></select>
<p><button type="submit" id="shortestPathButton">Calculate</button>
</form>
<div id="shortestPathResult"></div>
<h1>Nodes</h1>
<ul id="nodeList">
</ul>
<h1>Links</h1>
<ul id="linkList">
<li><i>No linked nodes.</i></li>
</ul>
<h1>Saved graphs</h1>
<p><button type="submit" id="saveGraphButton">Save current graph</button>
<ul id="graphList"></ul>
</div>
</div>
<script>
new Noty({
theme: 'relax',
type: 'info',
layout: 'topLeft',
text: 'Click on the <img src="resources/images/link.png"> <strong>link button</strong> of a node to link it with another node.',
timeout: 10000
}).show();
</script>
<script src="ts-built/drag.js" type="module"></script>
<script src="ts-built/main.js" type="module"></script>
<script src="ts-built/Graph.js" type="module"></script>
<script src="ts-built/AdjacencyMatrix.js" type="module"></script>
<script src="ts-built/Link.js" type="module"></script>
<script src="ts-built/Node.js" type="module"></script>
</body>
</html>