diff options
author | hwc487 | 2012-05-02 17:00:46 -0700 |
---|---|---|
committer | hwc487 | 2012-05-02 17:00:46 -0700 |
commit | 571e4518d9550113d5696a61bbc07be8379ff4ac (patch) | |
tree | d8e4fc5964ec005b0c75e414c6eb80a3b04b09f4 /js/tools/RotateStage3DTool.js | |
parent | 8eac5582b72115969a9f915f4303535c22018033 (diff) | |
parent | 691beb1c39fc0baa683f1fc56cbc519fe58f306d (diff) | |
download | ninja-571e4518d9550113d5696a61bbc07be8379ff4ac.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/tools/RotateStage3DTool.js')
-rwxr-xr-x | js/tools/RotateStage3DTool.js | 18 |
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 | }, |