aboutsummaryrefslogtreecommitdiff
path: root/js/tools/ShapeTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/ShapeTool.js')
-rwxr-xr-xjs/tools/ShapeTool.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js
index d3a36163..92284d78 100755
--- a/js/tools/ShapeTool.js
+++ b/js/tools/ShapeTool.js
@@ -119,7 +119,7 @@ exports.ShapeTool = Montage.create(DrawingTool, {
119 RemoveCustomFeedback: { 119 RemoveCustomFeedback: {
120 value: function (event) { 120 value: function (event) {
121 if (this._targetedElement) { 121 if (this._targetedElement) {
122 this._targetedElement.classList.remove("elem-red-outline"); 122 this._targetedElement.classList.remove("active-element-outline");
123 this._targetedElement = null; 123 this._targetedElement = null;
124 } 124 }
125 125
@@ -136,23 +136,22 @@ exports.ShapeTool = Montage.create(DrawingTool, {
136 _showFeedbackOnMouseMove: { 136 _showFeedbackOnMouseMove: {
137 value: function (event) { 137 value: function (event) {
138 // TODO - This call is causing the canvas to redraw 3 times per mouse move 138 // TODO - This call is causing the canvas to redraw 3 times per mouse move
139 var targetedObject = this.application.ninja.stage.GetElement(event); 139 var targetedObject = this.application.ninja.stage.GetSelectableElement(event);
140 140
141 if (targetedObject) { 141 if (targetedObject) {
142 // TODO - Clean this up
143 if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject)) 142 if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject))
144 { 143 {
145 if (targetedObject !== this._targetedElement) { 144 if (targetedObject !== this._targetedElement) {
146 if(this._targetedElement) 145 if(this._targetedElement)
147 { 146 {
148 this._targetedElement.classList.remove("elem-red-outline"); 147 this._targetedElement.classList.remove("active-element-outline");
149 } 148 }
150 this._targetedElement = targetedObject; 149 this._targetedElement = targetedObject;
151 this._targetedElement.classList.add("elem-red-outline"); 150 this._targetedElement.classList.add("active-element-outline");
152 } 151 }
153 } 152 }
154 else if (this._targetedElement) { 153 else if (this._targetedElement) {
155 this._targetedElement.classList.remove("elem-red-outline"); 154 this._targetedElement.classList.remove("active-element-outline");
156 this._targetedElement = null; 155 this._targetedElement = null;
157 } 156 }
158 } 157 }
@@ -206,8 +205,6 @@ exports.ShapeTool = Montage.create(DrawingTool, {
206 } 205 }
207 }, 206 },
208 207
209
210
211 // We can draw on an existing canvas unless it has only a single shape object 208 // We can draw on an existing canvas unless it has only a single shape object
212 _useExistingCanvas: { 209 _useExistingCanvas: {
213 value: function() 210 value: function()