diff options
author | Valerio Virgillito | 2012-04-26 13:25:28 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-26 13:25:28 -0700 |
commit | 01e17da83667b6ad808721687b2dd9b67f1812e6 (patch) | |
tree | 89464acbb4dcf8c95e7b2f364c86d452a43b4644 /js/stage | |
parent | 1ccc4d6dcff232b00763a5a49d7ad7a91f78ad3f (diff) | |
parent | 902dc18296fc78f3b8e67d952c42981d926bb2fc (diff) | |
download | ninja-01e17da83667b6ad808721687b2dd9b67f1812e6.tar.gz |
Merge branch 'refs/heads/master' into stage-document-architecture
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/tool-handle.js | 15 |
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) |