aboutsummaryrefslogtreecommitdiff
path: root/js/tools/RotateStage3DTool.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-05-07 16:30:19 -0700
committerJohn Mayhew2012-05-07 16:30:19 -0700
commitdb4ba95f50148198759dde503ec1c778184d9dbe (patch)
tree8b79ad58108af2f17d15abc8cdc33d35229ab20d /js/tools/RotateStage3DTool.js
parent843d8ea8ee58a54bcb71d7b28dbf78fae153b491 (diff)
parent526e423e4a2734c2b139af23911e912452a4443f (diff)
downloadninja-db4ba95f50148198759dde503ec1c778184d9dbe.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts: js/components/layout/tools-list.reel/tools-list.html js/components/layout/tools-properties.reel/tools-properties.html js/components/tools-properties/brush-properties.reel/brush-properties.html js/components/tools-properties/fill-properties.reel/fill-properties.html js/components/tools-properties/pen-properties.reel/pen-properties.html js/components/tools-properties/pencil-properties.reel/pencil-properties.html js/components/tools-properties/selection-properties.reel/selection-properties.html js/components/tools-properties/shape-properties.reel/shape-properties.html js/components/tools-properties/tag-properties.reel/tag-properties.html js/components/tools-properties/text-properties.reel/text-properties.html
Diffstat (limited to 'js/tools/RotateStage3DTool.js')
-rwxr-xr-xjs/tools/RotateStage3DTool.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js
index d1701304..2a9c63db 100755
--- a/js/tools/RotateStage3DTool.js
+++ b/js/tools/RotateStage3DTool.js
@@ -96,6 +96,12 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
96 viewUtils.pushViewportObj( stage ); 96 viewUtils.pushViewportObj( stage );
97 var eltCtr = viewUtils.getCenterOfProjection(); 97 var eltCtr = viewUtils.getCenterOfProjection();
98 viewUtils.popViewportObj(); 98 viewUtils.popViewportObj();
99// if(this.application.ninja.documentController.webTemplate)
100 if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent")
101 {
102 eltCtr[0] = stage.scrollWidth/2;
103 eltCtr[1] = stage.scrollHeight/2;
104 }
99 105
100 var curMat = viewUtils.getMatrixFromElement(stage); 106 var curMat = viewUtils.getMatrixFromElement(stage);
101 var curMatInv = glmat4.inverse(curMat, []); 107 var curMatInv = glmat4.inverse(curMat, []);
@@ -113,8 +119,16 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
113 119
114 this._origin = viewUtils.localToGlobal(eltCtr, stage); 120 this._origin = viewUtils.localToGlobal(eltCtr, stage);
115 121
116 this._setTransformOrigin(false); 122// if(this.application.ninja.documentController.webTemplate)
117 123 if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent")
124 {
125 this._startOriginArray = [];
126 this._startOriginArray.push(this._origin.slice());
127 }
128 else
129 {
130 this._setTransformOrigin(false);
131 }
118 this.DrawHandles(); 132 this.DrawHandles();
119 } 133 }
120 }, 134 },