-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
162 lines (140 loc) · 7.87 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!doctype html>
<html>
<head>
<title>jsPlumbToolkit - Flowchart Builder Example</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<!-- CSS -->
<link rel="stylesheet" href="node_modules/jsplumbtoolkit/dist/css/jsplumbtoolkit.css">
<link rel="stylesheet" href="node_modules/@jsplumb/json-syntax-highlighter/jsplumbtoolkit-syntax-highlighter.css">
<link rel="stylesheet" href="node_modules/@jsplumb/toolkit-demo-support/jsplumbtoolkit-demo-support.css">
<link rel="stylesheet" href="node_modules/jsplumbtoolkit-editable-connectors/dist/css/jsplumbtoolkit-editable-connectors.css">
<!-- /CSS -->
<link rel="stylesheet" href="app.css">
</head>
<body>
<!-- content -->
<div class="jtk-demo-main" id="jtk-demo-flowchart">
<!-- this is the main drawing area -->
<div class="jtk-demo-canvas">
<!-- controls -->
<div class="controls" can-undo="false" can-redo="false">
<i class="fa fa-arrows selected-mode" mode="pan" title="Pan Mode"></i>
<i class="fa fa-pencil" mode="select" title="Select Mode"></i>
<i class="fa fa-home" reset title="Zoom To Fit"></i>
<i class="fa fa-undo" undo title="Undo last action"></i>
<i class="fa fa-repeat" redo title="Redo last action"></i>
<i class="fa fa-times" clear title="Clear flowchart"></i>
</div>
<!-- miniview -->
<div class="miniview"></div>
</div>
<div class="jtk-demo-rhs">
<!-- the node palette -->
<div class="sidebar node-palette">
<div data-node-type="question" title="Drag to add new" class="sidebar-item">
<i class="icon-tablet"></i>Question
</div>
<div data-node-type="action" title="Drag to add new" class="sidebar-item">
<i class="icon-eye-open"></i>Action
</div>
<div data-node-type="output" title="Drag to add new" class="sidebar-item">
<i class="icon-eye-open"></i>Output
</div>
</div>
<div class="description">
<p>
This sample application is a builder for flowcharts. Questions, actions and outputs are supported.
</p>
<ul>
<li>Drag from the palette above onto the workspace to add nodes</li>
<li>Drag from the arrow icon on any node that has one to any other node to establish a link, then provide a description for the link's label</li>
<li>Click a link to edit its label.</li>
<li>Click the 'Pencil' icon to enter 'select' mode, then select several nodes. Click the canvas to exit.</li>
<li>Click the 'Home' icon to zoom out and see all the nodes.</li>
</ul>
</div>
<!-- the current dataset -->
<div class="jtk-demo-dataset"></div>
</div>
</div>
<script type="jtk" id="tmplStart">
<div style="left:${left}px;top:${top}px;width:${w}px;height:${h}px;" class="flowchart-object flowchart-start">
<div style="position:relative">
<svg:svg width="${w}" height="${h}">
<svg:ellipse cx="${w/2}" cy="${h/2}" rx="${(w/2) - 10}" ry="${(h/2) - 10}"/>
<svg:text text-anchor="middle" x="${ w / 2 }" y="${ h / 2 }" dominant-baseline="central">${text}</svg:text>
</svg:svg>
</div>
<div class="drag-start connect"></div>
<jtk-source port-type="start" filter=".connect"/>
</div>
</script>
<script type="jtk" id="tmplAction">
<div style="left:${left}px;top:${top}px;width:${w}px;height:${h}px;" class="flowchart-object flowchart-action">
<div style="position:relative">
<svg:svg width="${w}" height="${h}">
<svg:rect x="10" y="10" width="${w-20}" height="${h-20}"/>
<svg:text text-anchor="middle" x="${w/2}" y="${h/2}" dominant-baseline="central">${text}</svg:text>
</svg:svg>
</div>
<div class="node-edit node-action"/>
<div class="node-delete node-action delete"/>
<div class="drag-start connect"></div>
<jtk-target port-type="target"/>
<jtk-source port-type="source" filter=".connect"/>
</div>
</script>
<script type="jtk" id="tmplQuestion">
<div style="left:${left}px;top:${top}px;width:${w}px;height:${h}px;" class="flowchart-object flowchart-question">
<div style="position:relative">
<svg:svg width="${w}" height="${h}">
<svg:path d="M ${w/2} 10 L ${w-10} ${h/2} L ${w/2} ${h-10} L 10 ${h/2} Z"/>
<svg:text text-anchor="middle" x="${w/2}" y="${h/2}" dominant-baseline="central">${text}</svg:text>
</svg:svg>
</div>
<div class="node-edit node-action"/>
<div class="node-delete node-action delete"/>
<div class="drag-start connect"></div>
<jtk-source port-type="source" filter=".connect"/>
<jtk-target port-type="target"/>
</div>
</script>
<script type="jtk" id="tmplOutput">
<div style="left:${left}px;top:${top}px;width:${w}px;height:${h}px;" class="flowchart-object flowchart-output">
<div style="position:relative">
<svg:svg width="${w}" height="${h}">
<svg:rect x="10" y="10" width="${w-20}" height="${h-20}"/>
<svg:text text-anchor="middle" x="${w/2}" y="${h/2}" dominant-baseline="central">${text}</svg:text>
</svg:svg>
</div>
<div class="node-edit node-action"/>
<div class="node-delete node-action delete"/>
<jtk-target port-type="target"/>
</div>
</script>
<!-- edit text (question or action or output or edge label) -->
<script type="jtk" class="dlg" id="dlgText" title="Enter Text">
<input type="text" size="50" jtk-focus jtk-att="text" value="${text}" jtk-commit="true"/>
</script>
<script type="jtk" class="dlg" id="dlgConfirm" title="Please Confirm">
${msg}?
</script>
<script type="jtk" class="dlg" id="dlgMessage" title="Message" cancel="false">
${msg}
</script>
<!-- /content -->
<!-- imports -->
<script src='node_modules/jsplumbtoolkit/dist/js/jsplumbtoolkit.js'></script>
<script src="node_modules/@jsplumb/json-syntax-highlighter/jsplumbtoolkit-syntax-highlighter.umd.js"></script>
<script src="node_modules/jsplumbtoolkit-undo-redo/dist/js/jsplumbtoolkit-undo-redo.js"></script>
<script src="node_modules/jsplumbtoolkit-drop/dist/js/jsplumbtoolkit-drop.js"></script>
<script src="node_modules/jsplumbtoolkit-labels/dist/js/jsplumbtoolkit-labels.js"></script>
<script src="node_modules/jsplumbtoolkit-editable-connectors/dist/js/jsplumbtoolkit-editable-connectors.js"></script>
<script src="node_modules/jsplumbtoolkit-print/dist/js/jsplumbtoolkit-print.js"></script>
<!-- /imports -->
<!-- demo -->
<script src="app.js"></script>
<!-- /demo -->
</body>
</html>