From e4e3ee77aa01f9b6e7592306ebfa9f123a60c624 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 6 Jun 2012 13:59:37 -0700 Subject: Do not create any tags or shapes with width or height of 0. Signed-off-by: Nivesh Rajbhandari --- js/tools/SelectionTool.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/tools/SelectionTool.js') diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 7b72a857..ed92b893 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js @@ -49,6 +49,8 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { startDraw: { value: function(event) { + this.drawData = null; + if(!this.application.ninja.selectedElements.length) { this._isSelecting = true; -- cgit v1.2.3 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/SelectionTool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/tools/SelectionTool.js') diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index ed92b893..493f4aa2 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js @@ -224,9 +224,9 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { HandleDoubleClick: { value: function(event) { if(this.application.ninja.selectedElements.length > 0) { - this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]; + this.application.ninja.currentDocument.model.domContainer = this.application.ninja.selectedElements[0]; } else { - this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.model.documentRoot; + this.application.ninja.currentDocument.model.domContainer = this.application.ninja.currentDocument.model.documentRoot; } } }, -- cgit v1.2.3