-
Notifications
You must be signed in to change notification settings - Fork 0
/
PetriSim.html
76 lines (68 loc) · 2 KB
/
PetriSim.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
<!DOCTYPE HTML>
<html>
<head>
<title>PetriSim</title>
<script type="text/javascript" src="PetriSim.js"></script>
<style>
.selectBox {
display:inline-block;
}
.toolbar {
position:fixed;
top:0px;
left:0px;
}
#commands {
position:fixed;
top:0px;
right:20px;
}
#selection {
position:fixed;
top:20px;
left:20px;
}
#items {
margin-top:40px;
}
#graph_view {
margin-top:40px;
}
table, td, th {
border:1px solid black;
}
td, th {
width:40px;
}
</style>
</head>
<body>
<div id="items">
<div id="nodes" class="selectBox"></div>
<div id="transitions" class="selectBox"></div>
<div id="bounds" class="selectBox"></div>
</div>
<div id="toolbar" class="toolbar">
<button onclick="app.newNode();">+Node</button>
<button onclick="app.newTransition();">+Transition</button>
<button onclick="app.newBoundNT();">N->T link</button>
<button onclick="app.newBoundTN();">T->N link</button>
<button onclick="app.net.iterate();">step</button>
<button onclick="app.save();">save</button>
<button onclick="app.load();">load</button>
<button onclick="app.toString();">export to text</button>
<button onclick="app.fromString();">import from text</button>
<button onclick="app.toPrePostMatrix();">Compute Matrix</button>
<button onclick="app.hideItems();">hide items</button>
</div>
<div id="commands"></div>
<div id="selection">
<button onclick="hideSelection();">hide</button>
<div>
</div>
</div>
<canvas id="graph_view" width=1000 height=600></canvas>
<div id="export"></div>
<div id="matrix"></div>
</body>
</html>