diff options
author | Nivesh Rajbhandari | 2012-04-03 12:03:16 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-03 12:03:16 -0700 |
commit | 4d132fcbde4540c2cac6c0df613940353e2690f6 (patch) | |
tree | b5d9f42b1e63bb6be1015dc1b51f1465e3015239 /js/tools/ShapeTool.js | |
parent | 350d290d5fd0903289d55a7f4a6e643040e3d65e (diff) | |
download | ninja-4d132fcbde4540c2cac6c0df613940353e2690f6.tar.gz |
Give user feedback about which element the Fill/InkBottle tools will act on.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/ShapeTool.js')
-rwxr-xr-x | js/tools/ShapeTool.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js index 85009bc2..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 | } |