From 71795a786342b3d84ef904dc448b4ce840a44810 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 19 Jul 2012 13:37:04 -0700 Subject: IKNINJA-1924 - Hovering over panel resizers after collapsing and expanding panel causes error. Canvas sizes were not updated when using the splitter to toggle collapse/expansion of panels. This was fixed by the StageDrawingFixes pull request. We should also guard agains null value in stage's getElement routine. Signed-off-by: Nivesh Rajbhandari --- js/tools/ShapeTool.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'js/tools') 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, { this.doDraw(event); } else { this.doSnap(event); - this._showFeedbackOnMouseMove(event); } this.drawLastSnap(); // Required cleanup for both Draw/Feedbacks @@ -159,39 +158,6 @@ exports.ShapeTool = Montage.create(DrawingTool, { } }, - /** Show a border when mousing - * over existing canvas elements to signal to the user that - * the drawing operation will act on the targeted canvas. - **/ - _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, true); - - if (targetedObject) { - if((targetedObject.nodeName === "CANVAS") && !ShapesController.isElementAShape(targetedObject)) - { - if (targetedObject !== this._targetedElement) { - if(this._targetedElement) - { - this._targetedElement.classList.remove("active-element-outline"); - } - this._targetedElement = targetedObject; - this._targetedElement.classList.add("active-element-outline"); - } - } - else if (this._targetedElement) { - this._targetedElement.classList.remove("active-element-outline"); - this._targetedElement = null; - } - } - else if (this._targetedElement) { - this._targetedElement.classList.remove("elem-red-outline"); - this._targetedElement = null; - } - } - }, - RenderShape: { value: function (w, h, planeMat, midPt) -- cgit v1.2.3