diff --git a/js/threeViews/Highlighter.js b/js/threeViews/Highlighter.js index 4bdbc9d4bb0c081100d9740c8a4621e6c5935dea..338fa8db6d7374231c7ad844961a5e240df8f886 100644 --- a/js/threeViews/Highlighter.js +++ b/js/threeViews/Highlighter.js @@ -112,7 +112,7 @@ Highlighter = Backbone.View.extend({ if (shouldAdd){ if (!this.isVisible()) return; - if (this.intersectedFace && !this.intersectedCell) this.model.addCellAtPosition(this._getNextCellPosition()); + if (this.intersectedFace && !this.intersectedCell) this.model.addCellAtPosition(this._getNextCellPosition());//baseplane else this.model.addCellAtIndex(this._getNextCellVertices()); } else { if (this.intersectedFace && !this.intersectedCell) return;//baseplane @@ -120,6 +120,4 @@ Highlighter = Backbone.View.extend({ } this._hide(); } - - }); \ No newline at end of file diff --git a/js/threeViews/ThreeView.js b/js/threeViews/ThreeView.js index b53303ab78494bf3b542c6e57c6315ed126335bb..737c6f77069d3f66022dbc8f22ed985fa44a81fe 100644 --- a/js/threeViews/ThreeView.js +++ b/js/threeViews/ThreeView.js @@ -141,17 +141,12 @@ ThreeView = Backbone.View.extend({ this.highlighter.highlightCell(intersection.object, intersection.face); - if (this.appState.get("deleteMode") && this.mouseIsDown){ + if (!this.mouseIsDown) return; + if (this.appState.get("deleteMode")){ this.highlighter.addRemoveVoxel(false); - } else if (this.mouseIsDown && this.appState.get("shift")){ + } else if (this.appState.get("shift")){ this.highlighter.addRemoveVoxel(true); } -// if (this.appState.get("extrudeMode") && this.mouseIsDown){ -// if (!this.highlighter.isVisible) return; -// this.extrudeVisualizer.makeMeshFromProfile([this.highlighter]); -// return; -// } - } }); \ No newline at end of file