aboutsummaryrefslogtreecommitdiff
path: root/js/stage/tool-handle.js
diff options
context:
space:
mode:
authorhwc4872012-04-25 15:54:29 -0700
committerhwc4872012-04-25 15:54:29 -0700
commit34e6aa5a76fb49c3d9251cedf128c6ed971abb5c (patch)
treed506addbd3f15dbe77a881c1956ccf45b5d6eda8 /js/stage/tool-handle.js
parent1304d00cec00f86442981a276817416ca37086b3 (diff)
parentbcc8f8616f5ad4bf310928da6cbc01da12f6e468 (diff)
downloadninja-34e6aa5a76fb49c3d9251cedf128c6ed971abb5c.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Canvas-interaction
Diffstat (limited to 'js/stage/tool-handle.js')
-rwxr-xr-xjs/stage/tool-handle.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/js/stage/tool-handle.js b/js/stage/tool-handle.js
index d353da47..63cf30e5 100755
--- a/js/stage/tool-handle.js
+++ b/js/stage/tool-handle.js
@@ -585,7 +585,20 @@ exports.TranslateHandle = Montage.create(ToolHandle, {
585 this._origin = pointOnElt; 585 this._origin = pointOnElt;
586 586
587 587
588 var viewMat = viewUtils.getMatrixFromElement(this.application.ninja.currentDocument.documentRoot); 588 var stage = this.application.ninja.currentDocument.documentRoot;
589 var viewMat = viewUtils.getMatrixFromElement(stage);
590 // Get viewMat without zoom value
591 var zoom = this.application.ninja.documentBar.zoomFactor/100;
592 if(zoom !== 1)
593 {
594 var zoomMatInv = Matrix.create( [
595 [ 1/zoom, 0, 0, 0],
596 [ 0, 1/zoom, 0, 0],
597 [ 0, 0, 1/zoom, 0],
598 [ 0, 0, 0, 1]
599 ] );
600 glmat4.multiply( zoomMatInv, viewMat, viewMat );
601 }
589 602
590 var transMat = viewMat.slice(0); 603 var transMat = viewMat.slice(0);
591 if(inLocalMode) 604 if(inLocalMode)