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 34b3615b..4d8a318e 100755
--- a/js/tools/ShapeTool.js
+++ b/js/tools/ShapeTool.js
@@ -122,7 +122,7 @@ exports.ShapeTool = Montage.create(DrawingTool, {
122 RemoveCustomFeedback: { 122 RemoveCustomFeedback: {
123 value: function (event) { 123 value: function (event) {
124 if (this._targetedElement) { 124 if (this._targetedElement) {
125 this._targetedElement.classList.remove("elem-red-outline"); 125 this._targetedElement.classList.remove("active-element-outline");
126 this._targetedElement = null; 126 this._targetedElement = null;
127 } 127 }
128 128
@@ -139,23 +139,22 @@ exports.ShapeTool = Montage.create(DrawingTool, {
139 _showFeedbackOnMouseMove: { 139 _showFeedbackOnMouseMove: {
140 value: function (event) { 140 value: function (event) {
141 // TODO - This call is causing the canvas to redraw 3 times per mouse move 141 // TODO - This call is causing the canvas to redraw 3 times per mouse move
142 var targetedObject = this.application.ninja.stage.GetElement(event); 142 var targetedObject = this.application.ninja.stage.GetSelectableElement(event);
143 143
144 if (targetedObject) { 144 if (targetedObject) {
145 // TODO - Clean this up
146 if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject)) 145 if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject))
147 { 146 {
148 if (targetedObject !== this._targetedElement) { 147 if (targetedObject !== this._targetedElement) {
149 if(this._targetedElement) 148 if(this._targetedElement)
150 { 149 {
151 this._targetedElement.classList.remove("elem-red-outline"); 150 this._targetedElement.classList.remove("active-element-outline");
152 } 151 }
153 this._targetedElement = targetedObject; 152 this._targetedElement = targetedObject;
154 this._targetedElement.classList.add("elem-red-outline"); 153 this._targetedElement.classList.add("active-element-outline");
155 } 154 }
156 } 155 }
157 else if (this._targetedElement) { 156 else if (this._targetedElement) {
158 this._targetedElement.classList.remove("elem-red-outline"); 157 this._targetedElement.classList.remove("active-element-outline");
159 this._targetedElement = null; 158 this._targetedElement = null;
160 } 159 }
161 } 160 }
@@ -209,8 +208,6 @@ exports.ShapeTool = Montage.create(DrawingTool, {
209 } 208 }
210 }, 209 },
211 210
212
213
214 // We can draw on an existing canvas unless it has only a single shape object 211 // We can draw on an existing canvas unless it has only a single shape object
215 _useExistingCanvas: { 212 _useExistingCanvas: {
216 value: function() 213 value: function()