aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-01 07:01:44 -0700
committerNivesh Rajbhandari2012-05-01 07:01:44 -0700
commitc534f70e9af920d252d0d94151c9d6f884283b81 (patch)
treeb4c6fe88a2f27b18d3d61ffb7ac0145d74878eae /js/tools
parent9c8fbdd11fdbe9ae73d57147de84b799c5a87652 (diff)
downloadninja-c534f70e9af920d252d0d94151c9d6f884283b81.tar.gz
Get working plane grid to draw for new stage web template workflow.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/RotateStage3DTool.js16
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 },