From f91e64235eb03c889ff4f5577c3e3480cd0d787f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 13 Apr 2012 00:30:19 -0700 Subject: removing _undo array and _targets array and use object instead of matching arrays to set properties Signed-off-by: Valerio Virgillito --- js/tools/modifier-tool-base.js | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index de73c861..6de5d06c 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -125,8 +125,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { // } // } - - if(this._targets) + if(this.application.ninja.selectedElements.length) { var point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas, new WebKitPoint(event.pageX, event.pageY)); @@ -142,11 +141,10 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { } // we don't want to snap to selected objects during the drag - var len = this._targets.length; - for(var i=0; i --- js/tools/modifier-tool-base.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index 6de5d06c..8cd21a29 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -809,7 +809,10 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { if(!this._activateOriginHandle) { this.application.ninja.stage.drawNow = true; + var canSnap = this._canSnap; + this._canSnap = true; this.doSelection(event); + this._canSnap = canSnap; } } -- cgit v1.2.3