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

viewing options

parent 84355094
Branches
No related tags found
No related merge requests found
...@@ -15,13 +15,13 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell' ...@@ -15,13 +15,13 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell'
}, },
_showConductors: function(){ _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(); this.setOpaque();
three.render(); three.render();
return; return;
} }
var groupNum = eSim.get("visibleConductorGroup"); var allVisible = groupNum == -1;
var allVisible = groupNum < 0;
this._loopCells(this.sparseCells, function(cell){ this._loopCells(this.sparseCells, function(cell){
if (cell) cell.setTransparent(function(evalCell){ if (cell) cell.setTransparent(function(evalCell){
return !(evalCell.conductiveGroupVisible(allVisible, groupNum)); return !(evalCell.conductiveGroupVisible(allVisible, groupNum));
......
...@@ -15,7 +15,11 @@ Simulation Type: &nbsp;&nbsp; ...@@ -15,7 +15,11 @@ Simulation Type: &nbsp;&nbsp;
Num Connected Conductors: &nbsp;&nbsp<%= conductorGroups.length %><br/> Num Connected Conductors: &nbsp;&nbsp<%= conductorGroups.length %><br/>
<% if(conductorGroups.length > 0){ %> <% if(conductorGroups.length > 0){ %>
<label class="radio"> <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 Show All Conducting Groups
</label> </label>
<% _.each(conductorGroups, function(groupData, index){ %> <% _.each(conductorGroups, function(groupData, index){ %>
......
<% if(conductorGroups && conductorGroups.length > 0){ %> <% if(conductorGroups && conductorGroups.length > 0){ %>
<label class="radio"> <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 Show All Conducting Groups
</label> </label>
<% _.each(conductorGroups, function(groupData, index){ %> <% _.each(conductorGroups, function(groupData, index){ %>
...@@ -11,8 +15,10 @@ ...@@ -11,8 +15,10 @@
<input data-property="current" data-index="<%= index %>" value="<%= groupData.current %>" placeholder="Current" class="form-control floatInput eSimGroup currentInput" type="text"> <input data-property="current" data-index="<%= index %>" value="<%= groupData.current %>" placeholder="Current" class="form-control floatInput eSimGroup currentInput" type="text">
</label> </label>
<% }); %><br/> <% }); %><br/>
<div class="inlineSwatch capacitance"></div>Capacitance:<br/><br/> <div class="inlineSwatch capacitance"></div>Capacitance:<br/>
<div class="inlineSwatch inductance"></div>Inductance:<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 { %> <% } else { %>
<div class="inlineWarning">No conductive groups detected, please navigate to previous tab and calculate.</div> <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){ ...@@ -9,7 +9,9 @@ define(['underscore', 'backbone'], function(_, Backbone){
defaults:{ defaults:{
conductorGroups: null,//[{id: xx, current:xx, voltage:xx}] 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.
Please register or to comment