This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
indexDev.html
604 lines (602 loc) · 19 KB
/
indexDev.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
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<html>
<script src="http://localhost:9000/bundle.js"></script>
<link
rel="stylesheet"
type="text/css"
href="./node_modules/jquery-ui-dist/jquery-ui.css"
/>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> -->
<!-- <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> -->
<script>
var userSignedIn = 1;
var logix_project_id = 0;
var projectName = "Untitled";
</script>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="/">CircuitVerse</a>
<button
class="navbar-toggler collapsed"
type="button"
data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1"
aria-controls="collapsedNavbar"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="navbar-nav mr-auto noSelect pointerCursor" id="toolbar">
<li class="dropdown">
<a
href="#"
class="dropdown-toggle text-light"
data-toggle="dropdown"
role="button"
aria-haspopup="true"
aria-expanded="false"
>Project<span class="caret"></span
></a>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item logixButton" id="newProject"
>New Project</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="clearProject"
>Clear Project</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="save">Save Online</a>
</li>
<li>
<a class="dropdown-item logixButton" id="saveOffline"
>Save Offline</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="createOpenLocalPrompt"
>Open Offline</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="recoverProject"
>Recover Project</a
>
</li>
</ul>
</li>
<li class="dropdown">
<a
href="#"
class="dropdown-toggle text-light"
data-toggle="dropdown"
role="button"
aria-haspopup="true"
aria-expanded="false"
>Circuit<span class="caret"></span
></a>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item logixButton" id="newCircuit"
>New Circuit +</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="createSubCircuitPrompt"
>Insert SubCircuit</a
>
</li>
</ul>
</li>
<li class="dropdown">
<a
href="#"
class="dropdown-toggle text-light"
data-toggle="dropdown"
role="button"
aria-haspopup="true"
aria-expanded="false"
>Tools<span class="caret"></span
></a>
<ul class="dropdown-menu">
<li>
<a
class="dropdown-item logixButton"
id="createCombinationalAnalysisPrompt"
>Combinational Analysis</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="bitconverter"
>Hex-Bin-Dec-Converter</a
>
</li>
<li>
<a class="dropdown-item logixButton" id="startPlot">Start Plot</a>
</li>
<li>
<a class="dropdown-item logixButton" id="createSaveAsImgPrompt"
>Download Image</a
>
</li>
</ul>
</li>
<li class="">
<a
href="https://docs.circuitverse.org"
class="text-light"
target="_blank"
role="button"
aria-haspopup="true"
aria-expanded="false"
>Help</a
>
</li>
</ul>
<span
class="projectName noSelect defaultCursor font-weight-bold"
id="projectName"
>
Untitled
</span>
</div>
<!-- /.navbar-collapse -->
</nav>
<div>
<div class="side left" id="sideBar">
<div class="modules noSelect defaultCursor">
<div id="modules-header">Circuit Elements</div>
<div class="accordion" id="menu"></div>
</div>
<div class="moduleProperty effect1" id="moduleProperty">
<div id="moduleProperty-title" class="noSelect">Properties</div>
<div id="moduleProperty-inner"></div>
<!-- <div id="moduleProperty-toolTip"></div> -->
</div>
</div>
<div class="rightPanel">
<div id="tabsBar" class="noSelect pointerCursor">
<!-- <div> Circuits: </div> -->
</div>
<div class="simulation" id="simulation">
<!-- <div id="restrictedDiv" class="alert alert-danger display--none"></div>
<div id="restrictedElementsDiv" class="alert alert-danger">
<div>
Restricted elements used:
<span id="restrictedElementsDiv--list"> </span>
</div>
</div> -->
<div id="MessageDiv"></div>
<div class="canvasArea" id="canvasArea">
<canvas
id="backgroundArea"
style="position: absolute; left: 0; top: 0; z-index: 0; width:100%;height:100%"
></canvas>
<canvas
id="simulationArea"
style="position: absolute; left: 0; top: 0; z-index: 1; width:100%;height:100%"
></canvas>
<div id="plot">
<canvas
id="plotArea"
style="position: absolute; left: 0; top: 0; z-index: 2"
></canvas>
</div>
<div id="miniMap">
<canvas
id="miniMapArea"
style="position: absolute; left:0; top: 0; z-index: 3;"
></canvas>
</div>
<div id="contextMenu" oncontextmenu="return false;">
<ul>
<li onclick="menuItemClicked(2)"><a>Paste</a></li>
<li onclick="menuItemClicked(0)"><a>Copy</a></li>
<li onclick="menuItemClicked(1)"><a>Cut</a></li>
<li onclick="menuItemClicked(3)"><a>Delete</a></li>
<li onclick="menuItemClicked(4)"><a>Undo</a></li>
<li onclick="menuItemClicked(5)"><a>New Circuit</a></li>
<li onclick="menuItemClicked(6)"><a>Insert SubCircuit</a></li>
<li onclick="menuItemClicked(7)"><a>Center Focus</a></li>
</ul>
</div>
<div id="Help">
<!-- <canvas id="miniMapArea" style="position: absolute; left:0; top: 0; z-index: 2;"></canvas> -->
</div>
<div style="position:absolute; right:30px; top:30px; z-index:100">
<button type="button" class="btn zoomButton btn-lg" id="zoomIn">
<span
class="fa fa-search-plus"
aria-hidden="true"
title="Zoom In"
></span>
</button>
</div>
<div
class="sk-folding-cube loadingIcon"
style="display:none;position:absolute; right:50%; bottom:50%; z-index:100"
>
<div class="sk-cube1 sk-cube"></div>
<div class="sk-cube2 sk-cube"></div>
<div class="sk-cube4 sk-cube"></div>
<div class="sk-cube3 sk-cube"></div>
</div>
<div style="position:absolute; right:60px; top:30px; z-index:100">
<button
type="button"
class="btn zoomButton btn-lg"
onclick="globalScope.centerFocus(false)"
>
<span
class="fa fa-crosshairs"
aria-hidden="true"
title="Zoom To Fit"
></span>
</button>
</div>
<div style="position:absolute; right:90px; top:30px; z-index:100">
<button type="button" class="btn zoomButton btn-lg" id="zoomOut">
<span
class="fa fa-search-minus"
aria-hidden="true"
title="Zoom Out"
></span>
</button>
</div>
<div style="position:absolute; right:120px; top:30px; z-index:100">
<button type="button" class="btn zoomButton btn-lg" id="undoButton">
<span
class="fas fa-undo-alt"
aria-hidden="true"
title="Undo"
></span>
</button>
</div>
<div style="position:absolute; right:150px; top:30px; z-index:100">
<button
type="button"
class="btn zoomButton btn-lg"
id="deleteSelected"
>
<span
class="fas fa-trash-alt"
aria-hidden="true"
title="Delete"
></span>
</button>
</div>
<div
id="layoutDialog"
style="display:none;Width:210px;"
class=""
title="Layout Options"
>
<div class="container">
<div class="panel-heading">Layout options</div>
<div class="">
Width:
<button
type="button"
class="btn zoomButton btn-lg"
id="decreaseLayoutWidth"
>
<span
class="fa fa-minus"
aria-hidden="true"
title="Decrease Width"
></span>
</button>
<button
type="button"
class="btn zoomButton btn-lg"
id="increaseLayoutWidth"
>
<span
class="fa fa-plus"
aria-hidden="true"
title="Increase Width"
></span>
</button>
</div>
<div class="">
Height:
<button
type="button"
class="btn zoomButton btn-lg"
id="decreaseLayoutHeight"
>
<span
class="fa fa-minus"
aria-hidden="true"
title="Decrease Height"
></span>
</button>
<button
type="button"
class="btn zoomButton btn-lg"
id="increaseLayoutHeight"
>
<span
class="fa fa-plus"
aria-hidden="true"
title="Increase Height"
></span>
</button>
</div>
<div class="">
Reset all nodes:
<button
type="button"
class="btn zoomButton btn-lg"
id="layoutResetNodes"
>
<span
class="fa fa-sync"
aria-hidden="true"
title="Reset"
></span>
</button>
</div>
<div class="">
Title:
<button
type="button"
class="btn zoomButton btn-lg"
id="layoutTitleUp"
>
<span
class="fa fa-arrow-up"
aria-hidden="true"
title="Up"
></span>
</button>
<button
type="button"
class="btn zoomButton btn-lg"
id="layoutTitleDown"
>
<span
class="fa fa-arrow-down"
aria-hidden="true"
title="Down"
></span>
</button>
<button
type="button"
class="btn zoomButton btn-lg"
id="layoutTitleLeft"
>
<span
class="fa fa-arrow-left"
aria-hidden="true"
title="Left"
></span>
</button>
<button
type="button"
class="btn zoomButton btn-lg"
id="layoutTitleRight"
>
<span
class="fa fa-arrow-right"
aria-hidden="true"
title="Right"
></span>
</button>
</div>
<div class="">
<p>
Title Enabled :
<label class="switch">
<input
type="checkbox"
checked
id="toggleLayoutTitle"
id="toggleLayoutTitle"
/>
<span class="slider2" title="Title"></span>
</label>
</p>
</div>
<div class="">
Save:
<button
type="button"
class="btn zoomButton btn-lg"
id="saveLayout"
>
<span
class="fa fa-check"
aria-hidden="true"
title="Save Layout"
></span>
</button>
Cancel:
<button
type="button"
class="btn zoomButton btn-lg"
id="cancelLayout"
>
<span
class="fa fa-times"
aria-hidden="true"
title="Cancel"
></span>
</button>
</div>
</div>
</div>
</div>
</div>
<div
id="combinationalAnalysis"
style="display:none;"
title="BooleanLogicTable"
></div>
<div id="bitconverterprompt" title="Dec-Bin-Hex-Converter"></div>
<div
id="insertSubcircuitDialog"
class="subcircuitdialog"
title="Insert SubCircuit"
></div>
<div
id="openProjectDialog"
style="display:none;"
title="Open Project"
></div>
</div>
<!-- Right panel -->
<div id="saveImageDialog" style="display:none;" title="Render Image">
<p>
<label class="option inline"
><input
type="radio"
name="imgType"
value="png"
checked="checked"
/>PNG</label
>
<label class="option inline"
><input type="radio" name="imgType" value="jpeg" />JPEG</label
>
<label class="option inline">
<input type="radio" name="imgType" value="svg" />SVG</label
>
<label class="option inline">
<input type="radio" name="imgType" value="bmp" />BMP</label
>
<label class="option inline">
<input type="radio" name="imgType" value="gif" />GIF</label
>
<label class="option inline">
<input type="radio" name="imgType" value="tiff" />TIFF</label
>
</p>
<p>
<label class="option inline"
><input type="radio" name="view" value="full" /> Full Circuit
View</label
>
<label class="option inline">
<input
type="radio"
name="view"
value="current"
checked="checked"
/>Current View</label
>
</p>
<p>
<label class="option inline"
><input type="checkbox" name="transparent" value="transparent" />
Transparent Background</label
>
</p>
<p>
Resolution:
<label class="option inline">
<input
type="radio"
name="resolution"
value="1"
checked="checked"
/>1x</label
>
<label class="option inline"
><input type="radio" name="resolution" value="2" /> 2x</label
>
<label class="option inline">
<input type="radio" name="resolution" value="4" />4x</label
>
</p>
</div>
<script>
var embed = false;
var listenToSimulator = true;
var userSignedIn = true;
var restrictedElements = [];
</script>
<!-- on hover for dropdowns -->
<script>
$(".dropdown-toggle").hover(function() {
$(".dropdown.open").removeClass("open");
$(this)
.parent(".dropdown")
.addClass("open");
});
// $('.dropdown-toggle').onClick( function() {
//
// $(this).parent('.dropdown').addClass('open');
// });
</script>
<link rel="stylesheet" type="text/css" href="./css/UX.css" />
<link
rel="stylesheet"
type="text/css"
href="./css/restrictedElements.css"
/>
<link rel="stylesheet" type="text/css" href="./css/simulator.css" />
<!-- <script src="./SAP_DATA.js"></script> -->
<!---issue reporting-system----->
<div class="report-sidebar">
<a
type="button"
id="reportIssue"
class="btn btn-primary text-light"
data-toggle="modal"
data-target=".issue"
>
<span class="fa fa-bug"></span> Report an issue</a
>
</div>
<!---issue reporting system-modal---->
<div
class="modal fade issue"
tabindex="-1"
role="dialog"
aria-labelledby="mySmallModalLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="container my-2">
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
<div class="container text-center">
<h4>Report an issue</h4>
</div>
<hr />
<div class="container my-2 text-center" id="result"></div>
<label id="report-label" style="font-weight: lighter"
><b>Describe your issue:</b></label
>
<div class="form-group">
<textarea
class="form-control border-primary"
id="issuetext"
rows="3"
></textarea>
</div>
<div class="container">
<center>
<button type="submit" id="report" class="btn btn-primary">
Report
</button>
</center>
</div>
</div>
</div>
</div>
</div>
</div>
</html>