From a0d18963d746e410511c29edd32bc1775d2d5851 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 19 Jun 2012 15:42:31 -0700 Subject: IKNINJA-1519 - Transform tool does not transform objects correctly in 3D space or in Top/Side view. Signed-off-by: Nivesh Rajbhandari --- js/tools/modifier-tool-base.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 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 6c569f0a..14a7e619 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -21,7 +21,6 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { //------------------------------------------------------------------------- // Snapping-specific properties _canSnap: { value: true }, - _dragPlane: { value: null }, _snapParam: { value: null }, _snapIndex: { value: -1 }, _useQuadPt: { value: false }, @@ -163,15 +162,15 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { if(!this._dragPlane) { -// if( this._inLocalMode && (this._startMatArray.length === 1) ) -// { -// this._dragPlane = viewUtils.getUnprojectedElementPlane(this._clickedObject); -// snapManager.setupDragPlaneFromPlane(this._dragPlane); -// } -// else -// { + if((this._handleMode !== null) && (this.application.ninja.toolsData.selectedTool.action === "SelectionTool")) + { + this._dragPlane = viewUtils.getUnprojectedElementPlane(this.application.ninja.selectedElements[0]); + snapManager.setupDragPlaneFromPlane(this._dragPlane); + } + else + { this._dragPlane = snapManager.setupDragPlanes( hitRec, true ); -// } + } } // only do quadrant snapping if the 4 corners of the element are in the drag plane -- cgit v1.2.3