From 0b85b2812e4dfd54b9f9385ff4c9cb43eef52c70 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Sat, 31 Jan 2015 22:05:07 -0500
Subject: [PATCH] bugfix

---
 js/models/ThreeModel.js    | 3 +--
 js/threeViews/ThreeView.js | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/js/models/ThreeModel.js b/js/models/ThreeModel.js
index 9ab5d3b9..e6091708 100644
--- a/js/models/ThreeModel.js
+++ b/js/models/ThreeModel.js
@@ -74,8 +74,7 @@ function ThreeModel(){
         } else if (type == "part"){
             parts.splice(parts.indexOf(objectToRemove), 1);
         } else if (type == "basePlane"){
-            console.warn("something is wrong, deleting base plane");
-            basePlane.splice(basePlane.indexOf(objectToRemove), 1);
+            basePlane = [];
         }
 
         scene.remove(objectToRemove);
diff --git a/js/threeViews/ThreeView.js b/js/threeViews/ThreeView.js
index a2a9f512..bde28b8d 100644
--- a/js/threeViews/ThreeView.js
+++ b/js/threeViews/ThreeView.js
@@ -206,7 +206,7 @@ ThreeView = Backbone.View.extend({
             if (!this.highlighter.visible) return;
             this.lattice.addCell(this.highlighter.geometry.vertices[0]);
         } else {
-            if (this.currentIntersectedCell === this.basePlane) return;
+            if (this.currentIntersectedCell === this.model.basePlane[0]) return;
             this.lattice.removeCellFromMesh(this.currentIntersectedCell);
         }
         this._hideHighlighter();
-- 
GitLab