aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorhwc4872012-04-26 13:04:25 -0700
committerhwc4872012-04-26 13:04:25 -0700
commit37f2d5230175c0fb9a4792f5e3d804f7604442e1 (patch)
treec8260f151270c6bdbe08869ebaeb837777c28d1b /js/stage
parentf13d0f45f6b449764898e99db309c43b51a33476 (diff)
parent902dc18296fc78f3b8e67d952c42981d926bb2fc (diff)
downloadninja-37f2d5230175c0fb9a4792f5e3d804f7604442e1.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage.reel/stage.js4
-rwxr-xr-xjs/stage/tool-handle.js15
2 files changed, 17 insertions, 2 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index ec8c0e55..8382135d 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -252,7 +252,9 @@ exports.Stage = Montage.create(Component, {
252 this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; 252 this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft;
253 this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; 253 this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop;
254 254
255 this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); 255 // Hardcode this value so that it does not fail for the new stage architecture
256 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
257 this.userContentBorder = 1; //parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border"));
256 258
257 this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; 259 this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder;
258 this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; 260 this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder;
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)