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 ...@@ -15,9 +15,12 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell'], function(latti
}, },
_showConductors: function(){ _showConductors: function(){
if (!eSim.get("conductorGroups") || eSim.get("conductorGroups").length == 0){
this.setOpaque();
three.render();
return;
}
var groupNum = eSim.get("visibleConductorGroup"); var groupNum = eSim.get("visibleConductorGroup");
console.log(eSim.get("conductorGroups"));
console.log(groupNum);
var allVisible = groupNum < 0; 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){
...@@ -36,6 +39,7 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell'], function(latti ...@@ -36,6 +39,7 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell'], function(latti
if (cell) cell.propagateConductorGroupNum(); if (cell) cell.propagateConductorGroupNum();
}); });
this._calcNumberConnectedComponents(); this._calcNumberConnectedComponents();
this._showConductors();
}, },
_calcNumberConnectedComponents: function(){ _calcNumberConnectedComponents: function(){
......
...@@ -10,6 +10,7 @@ Simulation Type: &nbsp;&nbsp; ...@@ -10,6 +10,7 @@ Simulation Type: &nbsp;&nbsp;
<a href="#" id="calcConnectivity" class="btn btn-block btn-lg btn-default"><% if(conductorGroups){ %>Re-<% } %>Calculate Connectivity</a><br/> <a href="#" id="calcConnectivity" class="btn btn-block btn-lg btn-default"><% if(conductorGroups){ %>Re-<% } %>Calculate Connectivity</a><br/>
<% if(conductorGroups){ %> <% if(conductorGroups){ %>
Num Connected Conductors: &nbsp;&nbsp<%= conductorGroups.length %><br/> Num Connected Conductors: &nbsp;&nbsp<%= conductorGroups.length %><br/>
<% 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 < 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 Show All
...@@ -20,6 +21,5 @@ Simulation Type: &nbsp;&nbsp; ...@@ -20,6 +21,5 @@ Simulation Type: &nbsp;&nbsp;
Group Num <%= index + 1 %> Group Num <%= index + 1 %>
</label> </label>
<% }); %> <% }); %>
<% } %>
<% } %> <% } %>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment