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

viewing stuff

parent 37e30c43
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,12 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell'], function(latti
},
_showConductors: function(){
if (!eSim.get("conductorGroups") || eSim.get("conductorGroups").length == 0){
this.setOpaque();
three.render();
return;
}
var groupNum = eSim.get("visibleConductorGroup");
console.log(eSim.get("conductorGroups"));
console.log(groupNum);
var allVisible = groupNum < 0;
this._loopCells(this.sparseCells, function(cell){
if (cell) cell.setTransparent(function(evalCell){
......@@ -36,6 +39,7 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell'], function(latti
if (cell) cell.propagateConductorGroupNum();
});
this._calcNumberConnectedComponents();
this._showConductors();
},
_calcNumberConnectedComponents: function(){
......
......@@ -10,16 +10,16 @@ Simulation Type: &nbsp;&nbsp;
<a href="#" id="calcConnectivity" class="btn btn-block btn-lg btn-default"><% if(conductorGroups){ %>Re-<% } %>Calculate Connectivity</a><br/>
<% if(conductorGroups){ %>
Num Connected Conductors: &nbsp;&nbsp<%= conductorGroups.length %><br/>
<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>
Show All
</label>
<% _.each(conductorGroups, function(groupNum, index){ %>
<% if(conductorGroups.length > 0){ %>
<label class="radio">
<input type="radio" <% if (groupNum == visibleConductorGroup){ %>checked<% } %> name="visibleConductorGroup" value="<%= groupNum %>" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Group Num <%= index + 1 %>
<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>
Show All
</label>
<% }); %>
<% _.each(conductorGroups, function(groupNum, index){ %>
<label class="radio">
<input type="radio" <% if (groupNum == visibleConductorGroup){ %>checked<% } %> name="visibleConductorGroup" value="<%= groupNum %>" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Group Num <%= index + 1 %>
</label>
<% }); %>
<% } %>
<% } %>
\ No newline at end of file
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