From 4d132fcbde4540c2cac6c0df613940353e2690f6 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 3 Apr 2012 12:03:16 -0700 Subject: Give user feedback about which element the Fill/InkBottle tools will act on. Signed-off-by: Nivesh Rajbhandari --- js/tools/ShapeTool.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'js/tools/ShapeTool.js') 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, { RemoveCustomFeedback: { value: function (event) { if (this._targetedElement) { - this._targetedElement.classList.remove("elem-red-outline"); + this._targetedElement.classList.remove("active-element-outline"); this._targetedElement = null; } @@ -136,23 +136,22 @@ exports.ShapeTool = Montage.create(DrawingTool, { _showFeedbackOnMouseMove: { value: function (event) { // TODO - This call is causing the canvas to redraw 3 times per mouse move - var targetedObject = this.application.ninja.stage.GetElement(event); + var targetedObject = this.application.ninja.stage.GetSelectableElement(event); if (targetedObject) { - // TODO - Clean this up if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject)) { if (targetedObject !== this._targetedElement) { if(this._targetedElement) { - this._targetedElement.classList.remove("elem-red-outline"); + this._targetedElement.classList.remove("active-element-outline"); } this._targetedElement = targetedObject; - this._targetedElement.classList.add("elem-red-outline"); + this._targetedElement.classList.add("active-element-outline"); } } else if (this._targetedElement) { - this._targetedElement.classList.remove("elem-red-outline"); + this._targetedElement.classList.remove("active-element-outline"); this._targetedElement = null; } } -- cgit v1.2.3