diff options
author | Valerio Virgillito | 2012-04-11 10:32:52 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-11 10:32:52 -0700 |
commit | 9d1c919a4865ab1a2b0b0b9fc893a54b145c82c0 (patch) | |
tree | 9ebbe37bf22cb5280882a0ef5b95196fcf163251 /js/controllers/elements/stage-controller.js | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
parent | 36df4f454d64c7b43062835495425021ce955b05 (diff) | |
download | ninja-9d1c919a4865ab1a2b0b0b9fc893a54b145c82c0.tar.gz |
Merge pull request #161 from mqg734/PerspectiveFix
IKNinja-812 - Perspective fix
Diffstat (limited to 'js/controllers/elements/stage-controller.js')
-rwxr-xr-x | js/controllers/elements/stage-controller.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index dc916b1a..f376e40f 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js | |||
@@ -90,7 +90,7 @@ exports.StageController = Montage.create(ElementController, { | |||
90 | return el.elementModel.stageView.style.getProperty(p); | 90 | return el.elementModel.stageView.style.getProperty(p); |
91 | } | 91 | } |
92 | default: | 92 | default: |
93 | return ElementController.getProperty(el, p, false, true); | 93 | return ElementController.getProperty(el, p, true, true); |
94 | //console.log("Undefined Stage property ", p); | 94 | //console.log("Undefined Stage property ", p); |
95 | } | 95 | } |
96 | } | 96 | } |
@@ -119,6 +119,7 @@ exports.StageController = Montage.create(ElementController, { | |||
119 | break; | 119 | break; |
120 | case "-webkit-transform-style": | 120 | case "-webkit-transform-style": |
121 | el.elementModel.stageView.style.setProperty(p, value); | 121 | el.elementModel.stageView.style.setProperty(p, value); |
122 | this.application.ninja.stage.updatedStage = true; | ||
122 | break; | 123 | break; |
123 | default: | 124 | default: |
124 | console.log("Undefined property ", p, "for the Stage Controller"); | 125 | console.log("Undefined property ", p, "for the Stage Controller"); |
@@ -178,5 +179,20 @@ exports.StageController = Montage.create(ElementController, { | |||
178 | return mat; | 179 | return mat; |
179 | } | 180 | } |
180 | } | 181 | } |
181 | } | 182 | }, |
183 | |||
184 | getPerspectiveDist: { | ||
185 | value: function(el) { | ||
186 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) | ||
187 | { | ||
188 | return el.elementModel.props3D.perspectiveDist; | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, true); | ||
193 | el.elementModel.props3D.perspectiveDist = dist; | ||
194 | return dist; | ||
195 | } | ||
196 | } | ||
197 | }, | ||
182 | }); | 198 | }); |