aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/properties.js
diff options
context:
space:
mode:
authorJon Reid2012-04-10 14:52:23 -0700
committerJon Reid2012-04-10 14:52:23 -0700
commitc19987997758cf47ac9b93a2a767a0e2a9072745 (patch)
treeeb68491c5d04a5cf5ab75bedf2d6bbed3c7a3603 /js/panels/properties.reel/properties.js
parent03a3b32b9b0fd2dc8e4b54bfd5282fd1f8fb6ed6 (diff)
parent422b14fc60be84c116115f2e71e3499e232f3f05 (diff)
downloadninja-c19987997758cf47ac9b93a2a767a0e2a9072745.tar.gz
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-xjs/panels/properties.reel/properties.js24
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 {