aboutsummaryrefslogtreecommitdiff
path: root/js/tools/TranslateObject3DTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/TranslateObject3DTool.js')
-rwxr-xr-xjs/tools/TranslateObject3DTool.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/js/tools/TranslateObject3DTool.js b/js/tools/TranslateObject3DTool.js
index a3ece1f9..5dfd2029 100755
--- a/js/tools/TranslateObject3DTool.js
+++ b/js/tools/TranslateObject3DTool.js
@@ -77,15 +77,12 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, {
77 else 77 else
78 { 78 {
79 this._delta = null; 79 this._delta = null;
80 //if(this._handleMode === 2) { 80 this._dragPlane = viewUtils.getNormalToUnprojectedElementPlane(this._target, this._handleMode, (this._inLocalMode && (this.application.ninja.selectedElements.length === 1)));
81 this._dragPlane = viewUtils.getNormalToUnprojectedElementPlane(this._target, this._handleMode, this._inLocalMode); 81 snapManager.setupDragPlaneFromPlane(this._dragPlane);
82 //console.log( "dragPlane: " + this._dragPlane ); 82 do3DSnap = false;
83 snapManager.setupDragPlaneFromPlane(this._dragPlane); 83
84 do3DSnap = false; 84 snapManager.enableElementSnap ( false );
85 85 snapManager.enableGridSnap ( false );
86 snapManager.enableElementSnap ( false );
87 snapManager.enableGridSnap ( false );
88 //}
89 } 86 }
90 87
91 if(this.application.ninja.selectedElements.length) { 88 if(this.application.ninja.selectedElements.length) {
@@ -95,7 +92,7 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, {
95 // a snap on the mouse down 92 // a snap on the mouse down
96 var hitRec = snapManager.snap(point.x, point.y, do3DSnap); 93 var hitRec = snapManager.snap(point.x, point.y, do3DSnap);
97 94
98 if(this._handleMode === 2) 95 if(this._handleMode !== null)
99 { 96 {
100 // translate z doesn't snap to element so hitRec's element will always be different 97 // translate z doesn't snap to element so hitRec's element will always be different
101 // from what the browser says we clicked on. So, skip this check. 98 // from what the browser says we clicked on. So, skip this check.
@@ -135,7 +132,7 @@ exports.TranslateObject3DTool = Montage.create(Translate3DToolBase, {
135 snapManager.enableSnapAlign( snapManager.snapAlignEnabledAppLevel() ); 132 snapManager.enableSnapAlign( snapManager.snapAlignEnabledAppLevel() );
136 } 133 }
137 134
138 if(this._handleMode === 2) 135 if(this._handleMode !== null)
139 this.clickedObject = this._target; 136 this.clickedObject = this._target;
140 137
141 // parameterize the snap point on the target 138 // parameterize the snap point on the target