aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorhwc4872012-04-05 17:03:14 -0700
committerhwc4872012-04-05 17:03:14 -0700
commit96bfeee2e6b735b87e8482d6e2cf24d5224c6417 (patch)
treeb666f3658b437da96afbef9735643e2e3418c520 /js/tools
parent6ee8b65742fbe61b4429dc8c7dc9ca33a3e43600 (diff)
downloadninja-96bfeee2e6b735b87e8482d6e2cf24d5224c6417.tar.gz
translate3DObject tool fixes.
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/Translate3DToolBase.js7
-rwxr-xr-xjs/tools/modifier-tool-base.js2
2 files changed, 6 insertions, 3 deletions
diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js
index 4799b840..2276178c 100755
--- a/js/tools/Translate3DToolBase.js
+++ b/js/tools/Translate3DToolBase.js
@@ -71,6 +71,7 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
71 this._delta = delta.slice(0); 71 this._delta = delta.slice(0);
72 } 72 }
73 73
74 //console.log( "modifyElements delta: " + delta );
74 var transMat = Matrix.Translation( delta ); 75 var transMat = Matrix.Translation( delta );
75 76
76 if(this._inLocalMode && (this._targets.length === 1) ) 77 if(this._inLocalMode && (this._targets.length === 1) )
@@ -79,7 +80,6 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
79 } 80 }
80 else 81 else
81 { 82 {
82 console.log( "modifyElements delta: " + delta );
83 this._translateGlobally(transMat); 83 this._translateGlobally(transMat);
84 } 84 }
85 } 85 }
@@ -148,7 +148,7 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
148 _translateGlobally: { 148 _translateGlobally: {
149 value: function (transMat) { 149 value: function (transMat) {
150 //console.log( "_translateGlobally, transMat: " + transMat ); 150 //console.log( "_translateGlobally, transMat: " + transMat );
151 //console.log( "_translateGlobally, startMat: " + this._startMat + ", transMat: " + transMat ); 151 //console.log( "_translateGlobally, startMat: " + this._startMat + ", transMat: " + transMat[12] + ", " + transMat[13] + ", " + transMat[14] );
152 var len = this._targets.length, 152 var len = this._targets.length,
153 i = 0, 153 i = 0,
154 item, 154 item,
@@ -167,7 +167,8 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
167 167
168 var shouldUpdateStartMat = true; 168 var shouldUpdateStartMat = true;
169 169
170 if(this._clickedOnStage) 170 //if (this._clickedOnStage)
171 if(this._clickedOnStage || ((this._handleMode === 2) && (this._targets.length > 1)))
171 { 172 {
172 shouldUpdateStartMat = false; 173 shouldUpdateStartMat = false;
173 } 174 }
diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js
index 2c9b484e..f9fd001c 100755
--- a/js/tools/modifier-tool-base.js
+++ b/js/tools/modifier-tool-base.js
@@ -405,6 +405,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, {
405 var index = this._snapIndex; 405 var index = this._snapIndex;
406 var pt0; 406 var pt0;
407 var useViewPoint = (this._inLocalMode && (this._targets.length === 1)); 407 var useViewPoint = (this._inLocalMode && (this._targets.length === 1));
408 //console.log( "useViewPoint: " + useViewPoint );
408 if (this._useQuadPt) 409 if (this._useQuadPt)
409 { 410 {
410 pt0 = this.GetQuadrantPoint(useViewPoint); 411 pt0 = this.GetQuadrantPoint(useViewPoint);
@@ -427,6 +428,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, {
427 pt1 = MathUtils.transformPoint( pt1, this._startMat ); 428 pt1 = MathUtils.transformPoint( pt1, this._startMat );
428 } 429 }
429 430
431 //console.log( "getMousePoints, useViewPoint: " + useViewPoint + ", " + pt0 + " => " + pt1 );
430 return {pt0:pt0, pt1:pt1}; 432 return {pt0:pt0, pt1:pt1};
431 } 433 }
432 else 434 else