From cffaf1fea93ee200096f2122a47298b574ea6070 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Sat, 4 Jul 2015 04:35:50 -0700
Subject: [PATCH] typos

---
 js/lattice/LatticeEsim.js                        | 2 +-
 js/simulation/electronics/cells/eSimCell.js      | 3 +--
 js/simulation/electronics/cells/eSimSuperCell.js | 5 ++---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/js/lattice/LatticeEsim.js b/js/lattice/LatticeEsim.js
index 21588ebe..19b5c6b9 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 dd6a1f1d..18ee4563 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 a95e734c..83b4e66a 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;
                 }
             }
         }
-- 
GitLab