Skip to content
Snippets Groups Projects
Commit 8f342b69 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

viewing options

parent 84355094
No related branches found
No related tags found
No related merge requests found
......@@ -15,13 +15,13 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell'
},
_showConductors: function(){
if (!eSim.get("conductorGroups") || eSim.get("conductorGroups").length == 0){
var groupNum = eSim.get("visibleConductorGroup");
if (!eSim.get("conductorGroups") || eSim.get("conductorGroups").length == 0 || groupNum == -2){
this.setOpaque();
three.render();
return;
}
var groupNum = eSim.get("visibleConductorGroup");
var allVisible = groupNum < 0;
var allVisible = groupNum == -1;
this._loopCells(this.sparseCells, function(cell){
if (cell) cell.setTransparent(function(evalCell){
return !(evalCell.conductiveGroupVisible(allVisible, groupNum));
......
......@@ -15,7 +15,11 @@ Simulation Type: &nbsp;&nbsp;
Num Connected Conductors: &nbsp;&nbsp<%= conductorGroups.length %><br/>
<% if(conductorGroups.length > 0){ %>
<label class="radio">
<input type="radio" <% if (visibleConductorGroup < 0){ %>checked<% } %> name="visibleConductorGroup" value="-1" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
<input type="radio" <% if (visibleConductorGroup == -2){ %>checked<% } %> name="visibleConductorGroup" value="-2" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Show Everything
</label>
<label class="radio">
<input type="radio" <% if (visibleConductorGroup == -1){ %>checked<% } %> name="visibleConductorGroup" value="-1" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Show All Conducting Groups
</label>
<% _.each(conductorGroups, function(groupData, index){ %>
......
<% if(conductorGroups && conductorGroups.length > 0){ %>
<label class="radio">
<input type="radio" <% if (visibleConductorGroup < 0){ %>checked<% } %> name="visibleConductorGroup" value="-1" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
<input type="radio" <% if (visibleConductorGroup == -2){ %>checked<% } %> name="visibleConductorGroup" value="-2" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Show Everything
</label>
<label class="radio">
<input type="radio" <% if (visibleConductorGroup == -1){ %>checked<% } %> name="visibleConductorGroup" value="-1" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Show All Conducting Groups
</label>
<% _.each(conductorGroups, function(groupData, index){ %>
......@@ -11,8 +15,10 @@
<input data-property="current" data-index="<%= index %>" value="<%= groupData.current %>" placeholder="Current" class="form-control floatInput eSimGroup currentInput" type="text">
</label>
<% }); %><br/>
<div class="inlineSwatch capacitance"></div>Capacitance:<br/><br/>
<div class="inlineSwatch inductance"></div>Inductance:<br/>
<div class="inlineSwatch capacitance"></div>Capacitance:<br/>
<div class="inlineSwatch inductance"></div>Inductance:<br/><br/>
<a href="#" id="calcCapacitance" class="btn btn-block btn-lg btn-default"><% if(globalCapacitance){ %>Re-<% } %>Calculate Capacitance</a><br/>
<a href="#" id="calcInductance" class="btn btn-block btn-lg btn-default"><% if(globalInductance){ %>Re-<% } %>Calculate Inductance</a><br/>
<% } else { %>
<div class="inlineWarning">No conductive groups detected, please navigate to previous tab and calculate.</div>
<% } %>
\ No newline at end of file
......@@ -9,7 +9,9 @@ define(['underscore', 'backbone'], function(_, Backbone){
defaults:{
conductorGroups: null,//[{id: xx, current:xx, voltage:xx}]
visibleConductorGroup: -1
visibleConductorGroup: -1,
globalCapacitance: null,
globalInductance: null
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment