diff --git a/js/threeViews/Highlighter.js b/js/threeViews/Highlighter.js index de4cb9805e821b77d6b217409e14dbb4545e3bbf..bcd69d7b9fc9af647adcab9122db4159aa41651c 100644 --- a/js/threeViews/Highlighter.js +++ b/js/threeViews/Highlighter.js @@ -107,13 +107,13 @@ Highlighter = Backbone.View.extend({ if (shouldAdd){ if (!this.isVisible()) return; - this.model.addCell(this.highlighter.getNextCellPosition()); + this.model.addCell(this.getNextCellPosition()); } else { var currentIntersectedCell = this._getCurrentIntersectedCell(); - if (currentIntersectedCell === this.model.basePlane[0]) return; + if (currentIntersectedCell === this.model.get("basePlane").get("mesh")) return; this.model.removeCellFromMesh(currentIntersectedCell); } - this.highlighter.hide(); + this.hide(); }