diff options
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/Rotate3DToolBase.js | 1 | ||||
-rwxr-xr-x | js/tools/SelectionTool.js | 2 | ||||
-rwxr-xr-x | js/tools/ShapeTool.js | 34 | ||||
-rwxr-xr-x | js/tools/Translate3DToolBase.js | 1 | ||||
-rwxr-xr-x | js/tools/modifier-tool-base.js | 3 |
5 files changed, 0 insertions, 41 deletions
diff --git a/js/tools/Rotate3DToolBase.js b/js/tools/Rotate3DToolBase.js index e36e23c4..545aedad 100755 --- a/js/tools/Rotate3DToolBase.js +++ b/js/tools/Rotate3DToolBase.js | |||
@@ -485,7 +485,6 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, { | |||
485 | if(len === 1) | 485 | if(len === 1) |
486 | { | 486 | { |
487 | this.target = this.application.ninja.selectedElements[0]; | 487 | this.target = this.application.ninja.selectedElements[0]; |
488 | drawUtils.addElement(this.target); | ||
489 | 488 | ||
490 | viewUtils.pushViewportObj( this.target ); | 489 | viewUtils.pushViewportObj( this.target ); |
491 | var eltCtr = viewUtils.getCenterOfProjection(); | 490 | var eltCtr = viewUtils.getCenterOfProjection(); |
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 923ed819..a136113b 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js | |||
@@ -102,7 +102,6 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
102 | } | 102 | } |
103 | 103 | ||
104 | this.isDrawing = true; | 104 | this.isDrawing = true; |
105 | this.application.ninja.stage.showSelectionBounds = false; | ||
106 | 105 | ||
107 | this._use3DMode = false; | 106 | this._use3DMode = false; |
108 | 107 | ||
@@ -183,7 +182,6 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
183 | point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas, new WebKitPoint(event.pageX, event.pageY)); | 182 | point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas, new WebKitPoint(event.pageX, event.pageY)); |
184 | 183 | ||
185 | this.isDrawing = false; | 184 | this.isDrawing = false; |
186 | this.application.ninja.stage.showSelectionBounds = true; | ||
187 | if(this._escape) { | 185 | if(this._escape) { |
188 | this._escape = false; | 186 | this._escape = false; |
189 | this._isSelecting = false; | 187 | this._isSelecting = false; |
diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js index 26ed9c6f..ecc0dca3 100755 --- a/js/tools/ShapeTool.js +++ b/js/tools/ShapeTool.js | |||
@@ -70,7 +70,6 @@ exports.ShapeTool = Montage.create(DrawingTool, { | |||
70 | this.doDraw(event); | 70 | this.doDraw(event); |
71 | } else { | 71 | } else { |
72 | this.doSnap(event); | 72 | this.doSnap(event); |
73 | this._showFeedbackOnMouseMove(event); | ||
74 | } | 73 | } |
75 | 74 | ||
76 | this.drawLastSnap(); // Required cleanup for both Draw/Feedbacks | 75 | this.drawLastSnap(); // Required cleanup for both Draw/Feedbacks |
@@ -159,39 +158,6 @@ exports.ShapeTool = Montage.create(DrawingTool, { | |||
159 | } | 158 | } |
160 | }, | 159 | }, |
161 | 160 | ||
162 | /** Show a border when mousing | ||
163 | * over existing canvas elements to signal to the user that | ||
164 | * the drawing operation will act on the targeted canvas. | ||
165 | **/ | ||
166 | _showFeedbackOnMouseMove: { | ||
167 | value: function (event) { | ||
168 | // TODO - This call is causing the canvas to redraw 3 times per mouse move | ||
169 | var targetedObject = this.application.ninja.stage.getElement(event, true); | ||
170 | |||
171 | if (targetedObject) { | ||
172 | if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject)) | ||
173 | { | ||
174 | if (targetedObject !== this._targetedElement) { | ||
175 | if(this._targetedElement) | ||
176 | { | ||
177 | this._targetedElement.classList.remove("active-element-outline"); | ||
178 | } | ||
179 | this._targetedElement = targetedObject; | ||
180 | this._targetedElement.classList.add("active-element-outline"); | ||
181 | } | ||
182 | } | ||
183 | else if (this._targetedElement) { | ||
184 | this._targetedElement.classList.remove("active-element-outline"); | ||
185 | this._targetedElement = null; | ||
186 | } | ||
187 | } | ||
188 | else if (this._targetedElement) { | ||
189 | this._targetedElement.classList.remove("elem-red-outline"); | ||
190 | this._targetedElement = null; | ||
191 | } | ||
192 | } | ||
193 | }, | ||
194 | |||
195 | RenderShape: | 161 | RenderShape: |
196 | { | 162 | { |
197 | value: function (w, h, planeMat, midPt) | 163 | value: function (w, h, planeMat, midPt) |
diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js index 57a379e4..b5008666 100755 --- a/js/tools/Translate3DToolBase.js +++ b/js/tools/Translate3DToolBase.js | |||
@@ -302,7 +302,6 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase, | |||
302 | if(len) { | 302 | if(len) { |
303 | if(len === 1) { | 303 | if(len === 1) { |
304 | this.target = this.application.ninja.selectedElements[0]; | 304 | this.target = this.application.ninja.selectedElements[0]; |
305 | drawUtils.addElement(this.target); | ||
306 | 305 | ||
307 | viewUtils.pushViewportObj( this.target ); | 306 | viewUtils.pushViewportObj( this.target ); |
308 | var eltCtr = viewUtils.getCenterOfProjection(); | 307 | var eltCtr = viewUtils.getCenterOfProjection(); |
diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index 9b855e66..c772e36c 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js | |||
@@ -480,7 +480,6 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { | |||
480 | if(this._target) | 480 | if(this._target) |
481 | { | 481 | { |
482 | this.isDrawing = true; | 482 | this.isDrawing = true; |
483 | this.application.ninja.stage.showSelectionBounds = false; | ||
484 | this._updateTargets(); | 483 | this._updateTargets(); |
485 | 484 | ||
486 | if(this._canSnap) | 485 | if(this._canSnap) |
@@ -798,7 +797,6 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { | |||
798 | if(len === 1) | 797 | if(len === 1) |
799 | { | 798 | { |
800 | this.target = this.application.ninja.selectedElements[0]; | 799 | this.target = this.application.ninja.selectedElements[0]; |
801 | drawUtils.addElement(this.target); | ||
802 | } | 800 | } |
803 | else | 801 | else |
804 | { | 802 | { |
@@ -882,7 +880,6 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { | |||
882 | new WebKitPoint(event.pageX, event.pageY)); | 880 | new WebKitPoint(event.pageX, event.pageY)); |
883 | 881 | ||
884 | this.isDrawing = false; | 882 | this.isDrawing = false; |
885 | this.application.ninja.stage.showSelectionBounds = true; | ||
886 | if(this._escape) { | 883 | if(this._escape) { |
887 | this._escape = false; | 884 | this._escape = false; |
888 | return; | 885 | return; |