-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
244 lines (239 loc) · 13.8 KB
/
index.html
File metadata and controls
244 lines (239 loc) · 13.8 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<!DOCTYPE html>
<html ng-app="jsflap" ng-cloak="" ng-controller="AppController" jsflap-app>
<head lang="en">
<meta charset="UTF-8">
<title ng-bind-template="JSFLAP - {{graphMeta.title}}">JSFLAP</title>
<link rel="stylesheet" href="vendor/foundation-5.5.0/css/normalize.css">
<link rel="stylesheet" href="vendor/foundation-5.5.0/css/foundation.min.css">
<link href="vendor/font-awesome-4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="dist/css/jsflap.css">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<link rel="apple-touch-icon" href="/assets/icon_iphone.png">
</head>
<body ng-class="'mode_' + board.state.mode">
<top-bar role="navigation">
<ul class="title-area" tooltip-placement="bottom" tooltip-html-unsafe="<b>J</b>ava<b>S</b>cript <b>F</b>ormal <b>L</b>anguage and <b>A</b>utomatta <b>P</b>ackage, <i>inspired by JFLAP</i>">
<li class="name">
<h1><a href="#"><i class="fa fa-caret-right"></i><i class="fa fa-circle"></i> JSFLAP <small>beta</small></a></h1>
</li>
<li toggle-top-bar class="menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<top-bar-section>
<!-- Left Nav Section -->
<ul class="left">
<li has-dropdown>
<a href="#">File</a>
<ul top-bar-dropdown>
<li><a href="/" target="_blank"><i class="fa fa-file fa-fw"></i> New</a></li>
<!--<li has-dropdown>-->
<!--<a href="#"><i class="fa fa-folder-open fa-fw"></i> Open...</a>-->
<!--<ul top-bar-dropdown>-->
<!--<li><a href="#">Coming Soon</a></li>-->
<!--</ul>-->
<!--</li>-->
<li has-dropdown>
<a href="#"><i class="fa fa-share-square-o fa-fw"></i> Export...</a>
<ul top-bar-dropdown>
<li><a ng-click="saveToImage()" href=""><i class="fa fa-picture-o fa-fw"></i> PNG Image</a></li>
<li><a ng-click="saveToLaTeX()" href=""><i class="fa fa-file-code-o fa-fw"></i> LaTeX</a></li>
<li><a ng-click="saveToAutomatonDefinition()" href=""><i class="fa fa-file-text-o fa-fw"></i> Automaton Definition</a></li>
</ul>
</li>
</ul>
</li>
<li has-dropdown>
<a href="#">Edit</a>
<ul top-bar-dropdown>
<li><a ng-class="board.invocationStack.hasUndo()?'':'disabled'" href="#" ng-click="board.invocationStack.undo()"><i class="fa fa-undo"></i> Undo <kbd>CTRL/⌘ + Z</kbd></a></li>
<li><a ng-class="board.invocationStack.hasRedo()?'':'disabled'" href="#" ng-click="board.invocationStack.redo()"><i class="fa fa-undo fa-flip-horizontal"></i> Redo <kbd>CTRL/⌘ + Y</kbd></a></li>
</ul>
</li>
<li has-dropdown>
<a href="#">Help</a>
<ul top-bar-dropdown>
<li><a href="#" ng-click="openHelpModal()"><i class="fa fa-question-circle"></i> Help</a></li>
<li><a target="_blank" href="https://github.com/bgrawi/jsflap/issues" title="Report a Bug"><i class="fa fa-bug"></i> Repot a Bug</a></li>
</ul>
</li>
</ul>
</top-bar-section>
</top-bar>
<div class="full main-row">
<div class="icon-bar vertical three-up mode_selectors">
<a href="#" ng-click="board.setMode(0)" class="item mode_selector" ng-class="(board.state.mode === 0)?'active':''" tooltip-placement="right" tooltip-append-to-body="true" tooltip-popup-delay="1000" tooltip="Pencil tool: Click to create nodes, drag to create edges"><i class="fa fa-pencil"></i></a></li>
<a href="#" ng-click="board.setMode(1)" class="item mode_selector" ng-class="(board.state.mode === 1)?'active':''" tooltip-placement="right" tooltip-append-to-body="true" tooltip-popup-delay="1000" tooltip="Move tool: Move nodes, control points, or the board around"><i class="fa fa-arrows"></i></a></li>
<a href="#" ng-click="board.setMode(2)" class="item mode_selector" ng-class="(board.state.mode === 2)?'active':''" tooltip-placement="right" tooltip-append-to-body="true" tooltip-popup-delay="1000" tooltip="Eraser tool: Erase nodes, edges, or transitions when activated"><i class="fa fa-eraser"></i></a></li>
</div>
<section class="board-container" jsflap-board-container>
<svg tabindex="0" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" ng-class="'theme-' + board.settings.theme" jsflap-board>
<marker id="markerArrow" markerWidth="13" markerHeight="13" refx="8" refy="7"
orient="auto">
<path class="markerArrow" d="M2,2 L2,13 L8,7 L2,2" style="fill: #000000; shape-rendering: optimizeSpeed !important;"></path>
</marker>
<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
<path d="M 20 0 L 0 0 0 20" fill="none" stroke="#DDDDDD" stroke-width="1"/>
</pattern>
<g class="background"></g>
<g class="items">
<g class="nodes"></g>
<g class="edges"></g>
<g class="transitions"></g>
<g class="control-points"></g>
</g>
</svg>
</section>
<section class="board-sidebar">
<tabset>
<tab>
<tab-heading tooltip="Graph Settings" tooltip-placement="bottom" tooltip-append-to-body="true">
<i class="fa fa-cog"></i>
</tab-heading>
<div class="text-heading">
Graph Settings
</div>
<div class="text-subheading">
Graph Title and Type
</div>
<input ng-model="graphMeta.title" type="text">
<ul class="button-group even-2">
<li>
<button type="button" class="small button secondary" ng-model="graph.deterministic" btn-checkbox>
<i class="fa fa-fw" ng-class="{'fa-check-square': graph.deterministic, 'fa-square-o': !graph.deterministic}"></i> Deterministic
</button>
</li>
<li>
<button type="button" class="small button secondary dropdown" dropdown-toggle="#graph-settings-type">
{{graphMeta.type == 'FA'? 'Finite Automatta': 'Turing Machine'}}
</button>
<ul id="graph-settings-type" class="f-dropdown">
<li ng-repeat="(type, displayType) in availableTypes"><a href="#" ng-click="graphMeta.type = type">{{displayType}}</a></li>
</ul>
</li>
</ul>
<div class="text-subheading">
Display Options
</div>
<ul class="stack even-1 button-group">
<li>
<button type="button" class="small button expand secondary dropdown" dropdown-toggle="#graph-settings-themes">
<i class="fa fa-paint-brush"></i> Theme</a>
</button>
<ul id="graph-settings-themes" class="f-dropdown">
<li ng-repeat="(themeKey, themeName) in availableThemes" ng-class="themeKey === board.settings.theme? 'active': ''"><a href="#" ng-click="board.settings.theme = themeKey">{{themeName}}</a></li>
</ul>
</li>
<li>
<button type="button" class="small button expand secondary dropdown" dropdown-toggle="#graph-settings-transitionStyles">
<i class="fa fa-font"></i> Transition Style</a>
</button>
<ul id="graph-settings-transitionStyles" class="f-dropdown">
<li ng-repeat="transitionStyleName in availableTransitionStyles" ng-class="$index === board.settings.transitionStyle? 'active': ''"><a href="#" ng-click="board.settings.transitionStyle = $index; board.visualizations.update()">{{transitionStyleName}}</a></li>
</ul>
</li>
</ul>
<div class="text-subheading">
Status
</div>
<div class="row full">
<div class="small-12 columns text-subheading-status" ng-class="{'bg-color-valid': graph.isValid(), 'bg-color-invalid': !graph.isValid()}" style="text-align:center">
Graph is {{!graph.isValid()?'in':''}}valid
</div>
</div>
<div class="text-subheading-flush">
<div class="row full">
<div class="small-6 columns bg-color-gray1 text-subheading-status text">
<ng-pluralize count="graph.getNodes().items.length"
when="{'0': 'No nodes',
'one': '1 node',
'other': '{} nodes'}">
</ng-pluralize>
</div>
<div class="small-6 columns bg-color-gray1 text-subheading-status">
<ng-pluralize count="graph.getEdges().items.length"
when="{'0': 'No edges',
'one': '1 edge',
'other': '{} edges'}">
</ng-pluralize>
</div>
</div>
</div>
</tab>
<tab>
<tab-heading tooltip="Quick Input Test" tooltip-placement="bottom" tooltip-append-to-body="true">
<i class="fa fa-list"></i>
</tab-heading>
<div class="text-heading">
Quick Input Test
</div>
<div class="content">
<form name="testInputsForm" jsflap-test-inputs="">
<div class="text-subheading-flush">
<div class="row full">
<div class="small-4 columns bg-color-valid text-subheading-status">
{{resultTotals[1]}} Accepted
</div>
<div class="small-4 columns bg-color-invalid text-subheading-status">
{{resultTotals[0]}} Rejected
</div>
<div class="small-4 columns bg-color-gray1 text-subheading-status">
{{resultTotals[2]}} Unknown
</div>
</div>
</div>
<label ng-repeat="testInput in testInputs" ng-class="(testInput.result === true || testInput.result === false) ?(testInput.result?'accepted':'rejected'):''">
<input type="text" name="{{$index}}" ng-model="testInput.inputString" ng-trim="false" jsflap-test-input="" placeholder="Enter test string here" autocomplete="off">
<div class="testInputInfo" ng-show="hasOutputString"><strong>→</strong> {{testInput.outputString}}</div>
<div class="testInputInfo" ng-show="testInput.error !== ''"><strong>Error:</strong> {{testInput.error}}</div>
</label>
<a class="newTestInput" href="#" ng-click="addTestInput()">Enter test string here</a>
</form>
</div>
</tab>
<tab>
<tab-heading tooltip="Tools" tooltip-placement="bottom" tooltip-append-to-body="true">
<i class="fa fa-wrench"></i>
</tab-heading>
<div class="text-heading">
Tools
</div>
<div class="text-subheading">
General Tools
</div>
<ul class="stack even-1 button-group">
<li>
<button type="button" class="small button expand secondary" ng-click="board.reindexNodeNames()">
<i class="fa fa-fw fa-list-ol"></i> Re-index node labels
</button>
</li>
</ul>
</tab>
<tab>
<tab-heading tooltip="Simulate" tooltip-placement="bottom" tooltip-append-to-body="true">
<i class="fa fa-play"></i>
</tab-heading>
<div class="text-heading">
Simulate
</div>
<div class="text-subheading">
Coming Soon!
</div>
</tab>
</tabset>
</section>
</div>
<div jsflap-board-context-menu="">
</div>
<script src="bower_components/d3/d3.min.js" charset="utf-8"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="vendor/mm-foundation-tpls-0.5.1.min.js"></script>
<script src="dist/js/jsflap.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-67654300-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>