From 9eeb03e8bb86a4462609d3a18b528daa1516b91c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Mon, 7 May 2012 13:57:18 -0700 Subject: fixes for 2D and 3D translation. --- js/tools/TranslateObject3DTool.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'js/tools/TranslateObject3DTool.js') diff --git a/js/tools/TranslateObject3DTool.js b/js/tools/TranslateObject3DTool.js index b4f55bd9..f8b32d23 100755 --- a/js/tools/TranslateObject3DTool.js +++ b/js/tools/TranslateObject3DTool.js @@ -54,10 +54,10 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, { else { this._delta = null; - // special case for z-translation - if(this._handleMode === 2) + //if(this._handleMode === 2) { - this._dragPlane = viewUtils.getNormalToUnprojectedElementPlane(this._target); + this._dragPlane = viewUtils.getNormalToUnprojectedElementPlane(this._target, this._handleMode, this._inLocalMode); + //console.log( "dragPlane: " + this._dragPlane ); snapManager.setupDragPlaneFromPlane(this._dragPlane); do3DSnap = false; @@ -86,7 +86,8 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, { var elt = this.application.ninja.stage.getElement(event, true); if(elt && (elt !== hitRec.getElement())) { - hitRec = snapManager.findHitRecordForElement(elt); + var otherSnap = snapManager.findHitRecordForElement(elt); + if (otherSnap) hitRec = otherSnap; } if(elt === this.application.ninja.currentSelectedContainer) { -- cgit v1.2.3