aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/properties.js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-17 18:11:55 -0700
committerAnanya Sen2012-04-17 18:11:55 -0700
commit35abad196cc9feb76ef50c1b63032a38233a6d51 (patch)
tree914689c66d4ab6c6e088b571eade0a0e35082916 /js/panels/properties.reel/properties.js
parent1f891c58bad0b7746659aa4138001b5ee76d9a0e (diff)
parent616a8532099fec2a15855eac97cd85cb60c4451c (diff)
downloadninja-35abad196cc9feb76ef50c1b63032a38233a6d51.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-xjs/panels/properties.reel/properties.js29
1 files changed, 26 insertions, 3 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index d5acd503..d9dca538 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -113,13 +113,14 @@ exports.Properties = Montage.create(Component, {
113 } 113 }
114 114
115 if(this.application.ninja.selectedElements.length) { 115 if(this.application.ninja.selectedElements.length) {
116 ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); 116// ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi");
117 ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, this.application.ninja.selectedElements[0].id, "pi");
117 } else { 118 } else {
118 ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); 119 ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id);
119 } 120 }
120 } else if(event.target.id === "elementClass") { 121 } else if(event.target.id === "elementClass") {
121 if(this.application.ninja.selectedElements.length) { 122 if(this.application.ninja.selectedElements.length) {
122 ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); 123 ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi");
123 } else { 124 } else {
124 ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); 125 ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass);
125 } 126 }
@@ -146,8 +147,12 @@ exports.Properties = Montage.create(Component, {
146 value: function(event) { 147 value: function(event) {
147// console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update 148// 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") { 149 if(event.detail.source && event.detail.source !== "pi") {
150 var el = this.application.ninja.currentDocument.documentRoot;
151 if(this.application.ninja.selectedElements.length) {
152 el = this.application.ninja.selectedElements[0];
153 }
154
149 // TODO - This should only update the properties that were changed. 155 // 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")); 156 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left"));
152 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); 157 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top"));
153 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); 158 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
@@ -194,6 +199,19 @@ exports.Properties = Montage.create(Component, {
194 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height")); 199 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height"));
195 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); 200 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width"));
196 201
202 if(this.threeD.inGlobalMode)
203 {
204 this.threeD.xAngle = ElementsMediator.get3DProperty(stage, "xAngle");
205 this.threeD.yAngle = ElementsMediator.get3DProperty(stage, "yAngle");
206 this.threeD.zAngle = ElementsMediator.get3DProperty(stage, "zAngle");
207 }
208
209 if(ElementsMediator.getProperty(stage, "-webkit-transform-style") === "preserve-3d") {
210 this.threeD.flatten = false;
211 } else {
212 this.threeD.flatten = true;
213 }
214
197 if(this.customPi !== stage.elementModel.pi) { 215 if(this.customPi !== stage.elementModel.pi) {
198 // We need to unregister color chips from the previous selection from the Color Model 216 // We need to unregister color chips from the previous selection from the Color Model
199 var len = this.customSections.length; 217 var len = this.customSections.length;
@@ -258,6 +276,11 @@ exports.Properties = Montage.create(Component, {
258 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); 276 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
259 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); 277 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width"));
260 278
279 if(ElementsMediator.getProperty(el, "-webkit-transform-style") === "preserve-3d") {
280 this.threeD.flatten = false;
281 } else {
282 this.threeD.flatten = true;
283 }
261 284
262 if(this.threeD.inGlobalMode) 285 if(this.threeD.inGlobalMode)
263 { 286 {