From faaa4480dd02d38dd2132e96b24c67895b8e84f6 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Tue, 3 Feb 2015 23:08:14 -0500 Subject: [PATCH] small changes --- js/threeViews/Highlighter.js | 4 +--- js/threeViews/ThreeView.js | 11 +++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/js/threeViews/Highlighter.js b/js/threeViews/Highlighter.js index 4bdbc9d4..338fa8db 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 b53303ab..737c6f77 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 -- GitLab