diff options
author | Kris Kowal | 2012-07-06 11:52:06 -0700 |
---|---|---|
committer | Kris Kowal | 2012-07-06 15:01:48 -0700 |
commit | 648ee61ae84216d0236e0dbc211addc13b2cfa3a (patch) | |
tree | 8f0f55557bd0c47a84e49c1977c950645d284607 /js/tools/RotateStage3DTool.js | |
parent | aedd14b18695d031f695d27dfbd94df5614495bb (diff) | |
download | ninja-648ee61ae84216d0236e0dbc211addc13b2cfa3a.tar.gz |
Expand tabs
Diffstat (limited to 'js/tools/RotateStage3DTool.js')
-rwxr-xr-x | js/tools/RotateStage3DTool.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js index 2f655333..36bf285e 100755 --- a/js/tools/RotateStage3DTool.js +++ b/js/tools/RotateStage3DTool.js | |||
@@ -94,15 +94,15 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
94 | var eltCtr = viewUtils.getCenterOfProjection(); | 94 | var eltCtr = viewUtils.getCenterOfProjection(); |
95 | viewUtils.popViewportObj(); | 95 | viewUtils.popViewportObj(); |
96 | 96 | ||
97 | // cache the local to global and global to local matrices | 97 | // cache the local to global and global to local matrices |
98 | var l2gMat = viewUtils.getLocalToGlobalMatrix( elt ); | 98 | var l2gMat = viewUtils.getLocalToGlobalMatrix( elt ); |
99 | var g2lMat = glmat4.inverse( l2gMat, [] ); | 99 | var g2lMat = glmat4.inverse( l2gMat, [] ); |
100 | eltCtr = MathUtils.transformAndDivideHomogeneousPoint( eltCtr, l2gMat ); | 100 | eltCtr = MathUtils.transformAndDivideHomogeneousPoint( eltCtr, l2gMat ); |
101 | 101 | ||
102 | elt.elementModel.setProperty("mat", curMat); | 102 | elt.elementModel.setProperty("mat", curMat); |
103 | elt.elementModel.setProperty("matInv", curMatInv); | 103 | elt.elementModel.setProperty("matInv", curMatInv); |
104 | elt.elementModel.setProperty("ctr", eltCtr); | 104 | elt.elementModel.setProperty("ctr", eltCtr); |
105 | elt.elementModel.setProperty("l2g", l2gMat); | 105 | elt.elementModel.setProperty("l2g", l2gMat); |
106 | elt.elementModel.setProperty("g2l", g2lMat); | 106 | elt.elementModel.setProperty("g2l", g2lMat); |
107 | 107 | ||
108 | ElementsMediator.setMatrix(elt, curMat, false, "rotateStage3DTool"); | 108 | ElementsMediator.setMatrix(elt, curMat, false, "rotateStage3DTool"); |
@@ -172,11 +172,11 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
172 | iMat, false, "rotateStage3DTool"); | 172 | iMat, false, "rotateStage3DTool"); |
173 | this.application.ninja.currentDocument.model.documentRoot.elementModel.props3D.m_transformCtr = null; | 173 | this.application.ninja.currentDocument.model.documentRoot.elementModel.props3D.m_transformCtr = null; |
174 | 174 | ||
175 | // let the document and stage manager know about the zoom change | 175 | // let the document and stage manager know about the zoom change |
176 | stage._firstDraw = true; | 176 | stage._firstDraw = true; |
177 | this.application.ninja.documentBar.zoomFactor = 100; | 177 | this.application.ninja.documentBar.zoomFactor = 100; |
178 | this.application.ninja.currentDocument.model.views.design.iframe.style.zoom = 1.0; | 178 | this.application.ninja.currentDocument.model.views.design.iframe.style.zoom = 1.0; |
179 | stage._firstDraw = false; | 179 | stage._firstDraw = false; |
180 | 180 | ||
181 | viewUtils.clearStageTranslation(); | 181 | viewUtils.clearStageTranslation(); |
182 | stage.centerStage(); | 182 | stage.centerStage(); |
@@ -185,7 +185,7 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
185 | this.isDrawing = false; | 185 | this.isDrawing = false; |
186 | this.endDraw(event); | 186 | this.endDraw(event); |
187 | 187 | ||
188 | // this.UpdateSelection(true); | 188 | // this.UpdateSelection(true); |
189 | this.Configure(true); | 189 | this.Configure(true); |
190 | } | 190 | } |
191 | } | 191 | } |