-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
88 lines (78 loc) · 4.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flowcharts</title>
<script src="https://kit.fontawesome.com/36fdbb8e6c.js" crossorigin="anonymous"></script>
<script src="./interpreter.js"></script>
<script src="./structures.js"></script>
<script src="./script.js"></script>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<svg id="palette" onload="makeDraggable(evt)">
<g class="draggable template statement" stroke="rgb(180, 180, 20)">
<rect x="10" y="10" width="150px" height="70px" fill="rgb(27, 172, 204)" />
<!--text style="fill: rgb(255, 255, 255); font-family: Arial, sans-serif; font-size: 20px; white-space: pre;"
x="65px" y="50">Step</text-->
<circle class="port in" cx="85" cy="20" r="6" stroke-width="0px" fill="rgb(57, 233, 44)"></circle>
<circle class="port out" cx="85" cy="70" r="6" stroke-width="0px" fill="rgb(255, 30, 30)"></circle>
<foreignObject x="10px" y="35px" width="150px" height="30px">
<input type="text" value="Step" xmlns="http://www.w3.org/1999/xhtml" disabled>
</foreignObject>
</g>
<g class="draggable template conditional" stroke="rgb(180, 180, 20)">
<rect x="130px" y="10px" width="100px" height="100px" transform="rotate(45)" fill="rgb(183, 27, 204)" />
<circle class="port in" cx="85" cy="115px" r="6" stroke-width="0px" fill="rgb(57, 233, 44)"></circle>
<circle class="port out conditional-true" cx="25px" cy="170px" r="6" stroke-width="0px" fill="rgb(255, 30, 30)"></circle>
<circle class="port out conditional-false" cx="145px" cy="170px" r="6" stroke-width="0px" fill="rgb(255, 30, 30)"></circle>
<text style="fill: rgb(255, 255, 255); font-family: Arial, sans-serif; font-size: 15px; white-space: pre;" stroke-width="0"
x="0" y="175">F</text>
<text style="fill: rgb(255, 255, 255); font-family: Arial, sans-serif; font-size: 15px; white-space: pre;" stroke-width="0"
x="160" y="175">T</text>
<foreignObject x="30px" y="165px" width="108px" height="30px">
<input type="text" value="Condition" xmlns="http://www.w3.org/1999/xhtml" disabled>
</foreignObject>
</g>
<g class="draggable template input" stroke="rgb(180, 180, 20)">
<polygon points="30 270 160 270 140 340 10 340" fill="rgb(255, 229, 28)" />
<circle class="port in" cx="85" cy="280" r="6" stroke-width="0px" fill="rgb(57, 233, 44)"></circle>
<circle class="port out" cx="85" cy="330" r="6" stroke-width="0px" fill="rgb(255, 30, 30)"></circle>
<foreignObject x="10px" y="295px" width="150px" height="30px">
<input type="text" value="Read" xmlns="http://www.w3.org/1999/xhtml" disabled>
</foreignObject>
</g>
<g class="draggable template output" stroke="rgb(180, 180, 20)">
<polygon points="30 370 160 370 140 440 10 440" fill="rgb(255, 229, 28)" />
<circle class="port in" cx="85" cy="380" r="6" stroke-width="0px" fill="rgb(57, 233, 44)"></circle>
<circle class="port out" cx="85" cy="430" r="6" stroke-width="0px" fill="rgb(255, 30, 30)"></circle>
<foreignObject x="10px" y="395px" width="150px" height="30px">
<input type="text" value="Write" xmlns="http://www.w3.org/1999/xhtml" disabled>
</foreignObject>
</g>
<g class="draggable template stop" stroke="rgb(180, 180, 20)">
<circle cx="80" cy="520" r="50" fill="rgb(255, 30, 30)" />
<text style="font-family: Arial, sans-serif; font-size: 15px; white-space: pre;"
x="65" y="525" stroke-width="0px">Stop</text>
<circle class="port in" cx="80" cy="480" r="6" stroke-width="0px" fill="rgb(57, 233, 44)"></circle>
</g>
</svg>
<svg id="chart" onload="makeDraggable(evt)" stroke="rgb(180, 180, 20)">
<g id="view" transform="translate(0 0) scale(1)">
<g class="draggable start begin">
<circle cx="50" cy="50" r="50" fill="rgb(57, 233, 44)" />
<text style="font-family: Arial, sans-serif; font-size: 15px; white-space: pre;"
x="35" y="55" stroke-width="0px">Start</text>
<circle class="port out" cx="50" cy="90" r="6" stroke-width="0px" fill="rgb(255, 30, 30)"></circle>
</g>
</g>
</svg>
<div id="runner">
<button id="run" onclick="runOrStop()" title="Run"><i class="fas fa-play"></i></button>
<button id="step" onclick="debugOrStep()" title="Debug"><i class="fas fa-bug"></i></button>
<div id="console"></div>
</div>
</body>
</html>