diff options
author | Eric Guzman | 2012-05-29 15:29:11 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-29 15:29:11 -0700 |
commit | 25ac55c285bb4850118c644dc57adaeda5b9a859 (patch) | |
tree | b645941d7916716cbaf4860355df4101fc0f4c3c /js/tools/RotateStage3DTool.js | |
parent | 1fda3cea5f8dced1e14533969722e30b8ea1e6fa (diff) | |
parent | 58e454c828abf0b64fa62120359bcd78a0d34ac4 (diff) | |
download | ninja-25ac55c285bb4850118c644dc57adaeda5b9a859.tar.gz |
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into CSSPanelUpdates
Diffstat (limited to 'js/tools/RotateStage3DTool.js')
-rwxr-xr-x | js/tools/RotateStage3DTool.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js index c8818021..12b21a64 100755 --- a/js/tools/RotateStage3DTool.js +++ b/js/tools/RotateStage3DTool.js | |||
@@ -90,7 +90,7 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
90 | this._origin = null; | 90 | this._origin = null; |
91 | this._startOriginArray = null; | 91 | this._startOriginArray = null; |
92 | 92 | ||
93 | var stage = this.application.ninja.currentDocument.documentRoot; | 93 | var stage = this.application.ninja.currentDocument.model.documentRoot; |
94 | this.target = stage; | 94 | this.target = stage; |
95 | 95 | ||
96 | viewUtils.pushViewportObj( stage ); | 96 | viewUtils.pushViewportObj( stage ); |
@@ -119,7 +119,7 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
119 | 119 | ||
120 | captureElementChange: { | 120 | captureElementChange: { |
121 | value: function(event) { | 121 | value: function(event) { |
122 | if(event._event.item === this.application.ninja.currentDocument.documentRoot) | 122 | if(event._event.item === this.application.ninja.currentDocument.model.documentRoot) |
123 | { | 123 | { |
124 | this.captureSelectionDrawn(null); | 124 | this.captureSelectionDrawn(null); |
125 | } | 125 | } |
@@ -130,20 +130,22 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { | |||
130 | value : function() | 130 | value : function() |
131 | { | 131 | { |
132 | // Reset stage to identity matrix | 132 | // Reset stage to identity matrix |
133 | var iMat = Matrix.I(4); | 133 | var iMat = Matrix.I(4), |
134 | stage = this.application.ninja.stage; | ||
134 | 135 | ||
135 | ElementsMediator.setMatrix(this.application.ninja.currentDocument.documentRoot, | 136 | ElementsMediator.setMatrix(this.application.ninja.currentDocument.model.documentRoot, |
136 | iMat, false, "rotateStage3DTool"); | 137 | iMat, false, "rotateStage3DTool"); |
137 | this.application.ninja.currentDocument.documentRoot.elementModel.props3D.m_transformCtr = null; | 138 | this.application.ninja.currentDocument.model.documentRoot.elementModel.props3D.m_transformCtr = null; |
138 | 139 | ||
139 | // let the document and stage manager know about the zoom change | 140 | // let the document and stage manager know about the zoom change |
140 | this.application.ninja.stage._firstDraw = true; | 141 | stage._firstDraw = true; |
141 | this.application.ninja.documentBar.zoomFactor = 100; | 142 | this.application.ninja.documentBar.zoomFactor = 100; |
142 | this.application.ninja.currentDocument.model.views.design.iframe.style.zoom = 1.0; | 143 | this.application.ninja.currentDocument.model.views.design.iframe.style.zoom = 1.0; |
143 | this.application.ninja.stage._firstDraw = false; | 144 | stage._firstDraw = false; |
144 | 145 | ||
145 | // TODO - Any updates to the stage should redraw stage's children. Move this to mediator? | 146 | viewUtils.clearStageTranslation(); |
146 | this.application.ninja.stage.updatedStage = true; | 147 | stage.centerStage(); |
148 | stage.draw(); | ||
147 | 149 | ||
148 | this.isDrawing = false; | 150 | this.isDrawing = false; |
149 | this.endDraw(event); | 151 | this.endDraw(event); |