diff --git a/js/lattice/LatticeEsim.js b/js/lattice/LatticeEsim.js index 21588ebeeb10044d00204f462a27e67221d18106..19b5c6b990f596876ad349579c8f499fcb876a0e 100644 --- a/js/lattice/LatticeEsim.js +++ b/js/lattice/LatticeEsim.js @@ -24,7 +24,7 @@ define(['lattice', 'appState', 'threeModel', 'eSim', 'eSimCell', 'eSimSuperCell' var allVisible = groupNum < 0; this._loopCells(this.sparseCells, function(cell){ if (cell) cell.setTransparent(function(evalCell){ - return evalCell.conductiveGroupVisible(allVisible, groupNum); + return !(evalCell.conductiveGroupVisible(allVisible, groupNum)); }); }); three.render(); diff --git a/js/simulation/electronics/cells/eSimCell.js b/js/simulation/electronics/cells/eSimCell.js index dd6a1f1de11237d86a0e17ffd0900acdd20bec45..18ee456332171c27c500637f1063d63a51ebe67e 100644 --- a/js/simulation/electronics/cells/eSimCell.js +++ b/js/simulation/electronics/cells/eSimCell.js @@ -30,8 +30,7 @@ define(['cell', 'lattice'], function(DMACell, lattice){ }; DMACell.prototype.conductiveGroupVisible = function(allVisible, groupNum){ - console.log(allVisible); - return !this.isConductive() || (!allVisible && groupNum != this._eSimConductorGroup); + return this.isConductive() && (allVisible || groupNum == this._eSimConductorGroup); }; diff --git a/js/simulation/electronics/cells/eSimSuperCell.js b/js/simulation/electronics/cells/eSimSuperCell.js index a95e734cdcd80fc35fa498006138ca274ff36036..83b4e66a7318e719e877a2b77c263eca7f4404e4 100644 --- a/js/simulation/electronics/cells/eSimSuperCell.js +++ b/js/simulation/electronics/cells/eSimSuperCell.js @@ -9,9 +9,8 @@ define(['underscore', 'superCell'], function(_, DMASuperCell){ if (allVisible) return this.isConductive(); for (var i=0;i<this.cells.length;i++){ for (var j=0;j<this.cells[0].length;j++){ - for (var k=0;j<this.cells[0][0].length;k++){ - console.log("here"); - if (this.cells[i][j[k]] && this.cells[i][j][k].conductiveGroupVisible(allVisible, groupNum)) return true; + for (var k=0;k<this.cells[0][0].length;k++){ + if (this.cells[i][j][k] && this.cells[i][j][k].conductiveGroupVisible(allVisible, groupNum)) return true; } } }