From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- js/tools/ShapeTool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/tools/ShapeTool.js') diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js index 03ddc391..8d381711 100755 --- a/js/tools/ShapeTool.js +++ b/js/tools/ShapeTool.js @@ -103,8 +103,8 @@ exports.ShapeTool = Montage.create(DrawingTool, { if(wasSelected) { this.AddCustomFeedback(); this.application.ninja.elementMediator.addDelegate = this; - if(this.application.ninja.currentSelectedContainer.nodeName === "CANVAS") { - this._targetedElement = this.application.ninja.currentSelectedContainer; + if(this.application.ninja.currentDocument.model.domContainer.nodeName === "CANVAS") { + this._targetedElement = this.application.ninja.currentDocument.model.domContainer; } } else { this.RemoveCustomFeedback(); @@ -199,7 +199,7 @@ exports.ShapeTool = Montage.create(DrawingTool, { target = this._targetedElement; else { - var container = this.application.ninja.currentSelectedContainer; + var container = this.application.ninja.currentDocument.model.domContainer; if (container && (container.nodeName === "CANVAS")) { target = container; -- cgit v1.2.3