diff options
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/RotateStage3DTool.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js index d1701304..0210289f 100755 --- a/js/tools/RotateStage3DTool.js +++ b/js/tools/RotateStage3DTool.js | |||
@@ -96,6 +96,11 @@ 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 | { | ||
101 | eltCtr[0] = stage.scrollWidth/2; | ||
102 | eltCtr[1] = stage.scrollHeight/2; | ||
103 | } | ||
99 | 104 | ||
100 | var curMat = viewUtils.getMatrixFromElement(stage); | 105 | var curMat = viewUtils.getMatrixFromElement(stage); |
101 | var curMatInv = glmat4.inverse(curMat, []); | 106 | var curMatInv = glmat4.inverse(curMat, []); |
@@ -113,8 +118,15 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
113 | 118 | ||
114 | this._origin = viewUtils.localToGlobal(eltCtr, stage); | 119 | this._origin = viewUtils.localToGlobal(eltCtr, stage); |
115 | 120 | ||
116 | this._setTransformOrigin(false); | 121 | if(this.application.ninja.documentController.webTemplate) |
117 | 122 | { | |
123 | this._startOriginArray = []; | ||
124 | this._startOriginArray.push(this._origin.slice()); | ||
125 | } | ||
126 | else | ||
127 | { | ||
128 | this._setTransformOrigin(false); | ||
129 | } | ||
118 | this.DrawHandles(); | 130 | this.DrawHandles(); |
119 | } | 131 | } |
120 | }, | 132 | }, |