-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
embed.html.erb
83 lines (74 loc) · 3.12 KB
/
embed.html.erb
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
<div>
<div class="simulation" id="simulation" style="height:100%;width:100%">
<div id="tabsBar" class="noSelect pointerCursor" style="position: absolute; left: 0; top: 0; z-index: 4">
<!-- <div> Circuits: </div> -->
</div>
<div id="code-window" class='code-window-embed'><textarea id="codeTextArea"></textarea></div>
<% if @project&.assignment_id.present? && @project&.assignment.elements_restricted? %>
<div id="restrictedElementsDiv" class="alert alert-danger">
<div> <span style="font-style: italic"> Restricted elements used: </span> <span id="restrictedElementsDiv--list"> </span></div>
</div>
<% end %>
<div id="MessageDiv">
</div>
<div class="canvasArea" id="canvasArea" style="height:100%;width:100%">
<canvas id="backgroundArea" style="position: absolute; left: 0; top: 0; z-index: 0"></canvas>
<canvas id="simulationArea" style="position: absolute; left: 0; top: 0; z-index: 1; width:100%;height:100%"></canvas>
</div>
<div id="elementName">
</div>
<div class="zoom-wrapper" id="zoom-in-out-embed">
<div class="noSelect">
<button type="button" id='zoom-in-embed' class="" style="font-size: 25px;">
<span class="fa fa-search-plus" aria-hidden="true" title="Zoom In"></span>
</button>
</div>
<div class="noSelect">
<button type="button" id='zoom-out-embed' class="" style="font-size: 25px;">
<span class="fa fa-search-minus" aria-hidden="true" title="Zoom Out"></span>
</button>
</div>
</div>
<div style="position:absolute; right:10px; top:25px; z-index:100" class="clockPropertyHeader noSelect">
<div id="clockProperty">
</div>
</div>
<div class="sk-folding-cube loadingIcon" style="display:inline-block;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>
<% if @external_embed == true %>
<div id="bottom_right_circuit_heading">
<h5><%= @project.name %></h5>
</div>
<div id="bottom_right_watermark">
<a style="text-decoration:none;
position: fixed;
bottom: 0px;
right: 25px;
padding: 8px;
font-family: Verdana;
font-size: 12px;
color: grey;
z-index: 2;"
href="/users/<%= @author %>/projects/<%= @logix_project_id %>"
target="_blank">
Made With CircuitVerse
</a>
</div>
<% end %>
</div>
</div>
<script type="text/javascript">
__logix_project_id = "<%= @logix_project_id %>";
embed=true;
<% if @project&.assignment_id.present? %>
restrictedElements = JSON.parse('<%= raw @project&.assignment&.clean_restricted_elements %>');
<% else %>
restrictedElements = [];
<% end %>
</script>
</body>
</html>