diff options
author | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
commit | d14f78b06d37aa469885f2ecf84419bcb7e3e613 (patch) | |
tree | 91b95c6c9aef779a743b710105546a8ae74bff12 /js/panels/properties.reel/properties.js | |
parent | a9bcc403df76ad2cb7c31ff7fdd42a85c35cf424 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-d14f78b06d37aa469885f2ecf84419bcb7e3e613.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index d5acd503..625e3eb6 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -146,8 +146,12 @@ exports.Properties = Montage.create(Component, { | |||
146 | value: function(event) { | 146 | value: function(event) { |
147 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update | 147 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update |
148 | if(event.detail.source && event.detail.source !== "pi") { | 148 | if(event.detail.source && event.detail.source !== "pi") { |
149 | var el = this.application.ninja.currentDocument.documentRoot; | ||
150 | if(this.application.ninja.selectedElements.length) { | ||
151 | el = this.application.ninja.selectedElements[0]; | ||
152 | } | ||
153 | |||
149 | // TODO - This should only update the properties that were changed. | 154 | // TODO - This should only update the properties that were changed. |
150 | var el = this.application.ninja.selectedElements[0]; | ||
151 | this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); | 155 | this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); |
152 | this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); | 156 | this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); |
153 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); | 157 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); |
@@ -194,6 +198,19 @@ exports.Properties = Montage.create(Component, { | |||
194 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height")); | 198 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height")); |
195 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); | 199 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); |
196 | 200 | ||
201 | if(this.threeD.inGlobalMode) | ||
202 | { | ||
203 | this.threeD.xAngle = ElementsMediator.get3DProperty(stage, "xAngle"); | ||
204 | this.threeD.yAngle = ElementsMediator.get3DProperty(stage, "yAngle"); | ||
205 | this.threeD.zAngle = ElementsMediator.get3DProperty(stage, "zAngle"); | ||
206 | } | ||
207 | |||
208 | if(ElementsMediator.getProperty(stage, "-webkit-transform-style") === "preserve-3d") { | ||
209 | this.threeD.flatten = false; | ||
210 | } else { | ||
211 | this.threeD.flatten = true; | ||
212 | } | ||
213 | |||
197 | if(this.customPi !== stage.elementModel.pi) { | 214 | if(this.customPi !== stage.elementModel.pi) { |
198 | // We need to unregister color chips from the previous selection from the Color Model | 215 | // We need to unregister color chips from the previous selection from the Color Model |
199 | var len = this.customSections.length; | 216 | var len = this.customSections.length; |
@@ -258,6 +275,11 @@ exports.Properties = Montage.create(Component, { | |||
258 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); | 275 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); |
259 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); | 276 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); |
260 | 277 | ||
278 | if(ElementsMediator.getProperty(el, "-webkit-transform-style") === "preserve-3d") { | ||
279 | this.threeD.flatten = false; | ||
280 | } else { | ||
281 | this.threeD.flatten = true; | ||
282 | } | ||
261 | 283 | ||
262 | if(this.threeD.inGlobalMode) | 284 | if(this.threeD.inGlobalMode) |
263 | { | 285 | { |