From 355656cac2fa1a025ad97791ea095a54cebdff71 Mon Sep 17 00:00:00 2001
From: Nivesh Rajbhandari
Date: Tue, 1 May 2012 20:13:58 -0700
Subject: Support drawing in side and top view. Also, adding back support for
 drawing shapes inside canvas when double-clicked into canvas or when moused
 over canvas.

Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
---
 js/tools/ShapeTool.js | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'js/tools/ShapeTool.js')

diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js
index 8f45891d..d2337000 100755
--- a/js/tools/ShapeTool.js
+++ b/js/tools/ShapeTool.js
@@ -106,6 +106,9 @@ 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;
+                }
             } else {
                 this.RemoveCustomFeedback();
                 this.application.ninja.elementMediator.addDelegate = null;
-- 
cgit v1.2.3