-
Notifications
You must be signed in to change notification settings - Fork 35
/
index.html
54 lines (43 loc) · 2.57 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Dataflow graph editor</title>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<!-- Third-Party Libraries -->
<script src="libs/jquery.js"></script>
<script src="libs/jquery-ui.js"></script>
<script src="libs/jquery.ui.touch-punch.js"></script>
<script src="libs/underscore.js"></script>
<script src="libs/backbone.js"></script>
<script src="libs/hammer.min.js"></script>
<!-- Dataflow -->
<script src="build/dataflow.min.js"></script>
<!-- Nodes (some basics to extend) -->
<script src="src/nodes/base.js"></script>
<script src="src/nodes/base-resizable.js"></script>
<script src="src/nodes/test.js"></script>
<!-- Nodes (subgraph functionality) -->
<script src="src/nodes/dataflow-input.js"></script>
<script src="src/nodes/dataflow-output.js"></script>
<script src="src/nodes/dataflow-subgraph.js"></script>
<!-- Style -->
<link rel="stylesheet" href="build/default/dataflow.min.css" />
</head>
<body>
<!-- Testing -->
<script>
$(function($) {
// Everything should be loaded now
// Spin up app
var dataflow = new window.Dataflow();
// Load test graph
var g = dataflow.loadGraph(
{nodes:[{id:1, label:"test", type:"test", x:61, y:90, state:{select:"April"}, w:122, h:248}, {id:2, label:"test", type:"test", x:270, y:83, state:{select:"April"}, w:122, h:254}, {id:3, label:"subgraph", type:"dataflow-subgraph", x:453, y:78, w:134, h:111, graph:{nodes:[{id:"1", label:"in", type:"dataflow-input", x:180, y:15, 'input-type':"all"}, {id:3, label:"in2", type:"dataflow-input", x:196, y:132, 'input-type':"all"}, {id:2, label:"test", type:"test", x:566, y:74, state:{select:"April"}, w:200, h:400}, {id:"99", label:"out", type:"dataflow-output", x:947, y:120, 'output-type':"all"}], edges:[{source:{node:2, port:"output"}, target:{node:"99", port:"data"}}, {source:{node:"1", port:"data"}, target:{node:2, port:"input"}}, {source:{node:3, port:"data"}, target:{node:2, port:"string"}}]}}, {id:4, label:"test", type:"test", x:626, y:74, state:{select:"April"}, w:130, h:251}], edges:[{source:{node:1, port:"output"}, target:{node:2, port:"input"}, route:0}, {source:{node:2, port:"output"}, target:{node:3, port:"1"}, route:1}, {source:{node:3, port:"99"}, target:{node:4, port:"input"}, route:2}, {source:{node:2, port:"output"}, target:{node:3, port:3}, route:3}]}
);
g.trigger("change");
});
</script>
</body>
</html>