diff --git a/js/models/ThreeModel.js b/js/models/ThreeModel.js index 9ab5d3b97dcf9aae7891d4cd03623be0ae47bded..e6091708736299c48a00ae1d4886441f8715e86b 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 a2a9f512996f4495bae1bcaa30a6396eeff4796a..bde28b8d884ca23e1a12c9d7664ba54e116a7a24 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();