aboutsummaryrefslogtreecommitdiff
path: root/js/tools/modifier-tool-base.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-01 22:20:06 -0800
committerNivesh Rajbhandari2012-03-01 22:20:06 -0800
commit2c04935f0ccb1cb7c98371fc10b43155f2d956c4 (patch)
tree3535ba3b2a21e9eec43c43693410123f923c4faf /js/tools/modifier-tool-base.js
parent50058746779f714ed9b0287f49e56c9f0d35593e (diff)
downloadninja-2c04935f0ccb1cb7c98371fc10b43155f2d956c4.tar.gz
Fix for elements flying off into space when moving elements that overlap.
This was happening because our hit record's element and the browser's element from point did not match. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/modifier-tool-base.js')
-rwxr-xr-xjs/tools/modifier-tool-base.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js
index 7d946cb0..7892d015 100755
--- a/js/tools/modifier-tool-base.js
+++ b/js/tools/modifier-tool-base.js
@@ -133,6 +133,13 @@ exports.ModifierToolBase = Montage.create(DrawingTool, {
133 // a snap on the mouse down 133 // a snap on the mouse down
134 var hitRec = snapManager.snap(point.x, point.y, do3DSnap); 134 var hitRec = snapManager.snap(point.x, point.y, do3DSnap);
135 135
136 // TODO - Check that hitRec's element matches element that browser says we clicked on
137 var elt = this.application.ninja.stage.GetElement(event);
138 if(elt !== hitRec.getElement())
139 {
140 hitRec = snapManager.findHitRecordForElement(elt);
141 }
142
136 // we don't want to snap to selected objects during the drag 143 // we don't want to snap to selected objects during the drag
137 var len = this._targets.length; 144 var len = this._targets.length;
138 for(var i=0; i<len; i++) 145 for(var i=0; i<len; i++)