aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/content.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-08 13:14:29 -0800
committerJose Antonio Marquez2012-02-08 13:14:29 -0800
commit9b45b897949bf934c8bf2c90ee2ff78f8713cb12 (patch)
treee7c276a3934c823cab894f46ee7dc5d3eda9ca83 /js/panels/properties/content.reel
parentaa01c1210f3a4d9fd55a771b9de2c58ee3fa4bb6 (diff)
parent10cdeb52403f16d5d4be43a516e8cdfbc866a2a2 (diff)
downloadninja-9b45b897949bf934c8bf2c90ee2ff78f8713cb12.tar.gz
Merge branch 'refs/heads/NinjaInternal' into Color
Conflicts: js/controllers/elements/shapes-controller.js js/data/pi/pi-data.js js/panels/properties/content.reel/content.js
Diffstat (limited to 'js/panels/properties/content.reel')
-rw-r--r--js/panels/properties/content.reel/content.js32
1 files changed, 21 insertions, 11 deletions
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js
index 34c38e70..0088447a 100644
--- a/js/panels/properties/content.reel/content.js
+++ b/js/panels/properties/content.reel/content.js
@@ -97,10 +97,24 @@ exports.Content = Montage.create(Component, {
97 value: function(event) { 97 value: function(event) {
98// console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update 98// console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update
99 if(event.detail.source && event.detail.source !== "pi") { 99 if(event.detail.source && event.detail.source !== "pi") {
100 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "left")); 100 // TODO - This should only update the properties that were changed.
101 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "top")); 101 var el = this.application.ninja.selectedElements[0]._element || this.application.ninja.selectedElements[0];
102 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left"));
103 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top"));
104 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
105 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width"));
106
107 if(this.threeD.inGlobalMode)
108 {
109 this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D");
110 this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D");
111 this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D");
112 this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle");
113 this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle");
114 this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle");
102 } 115 }
103 } 116 }
117 }
104 }, 118 },
105 119
106 handleSelectionChange: { 120 handleSelectionChange: {
@@ -183,8 +197,11 @@ exports.Content = Montage.create(Component, {
183 197
184 if(control.type !== "color") { 198 if(control.type !== "color") {
185 currentValue = ElementsMediator.getProperty(el, control.prop, control.valueMutator); 199 currentValue = ElementsMediator.getProperty(el, control.prop, control.valueMutator);
186 currentValue ? currentValue = currentValue : currentValue = control.defaultValue; 200 if(currentValue === null)
187 this.customSections[0].content.controls[control.id] = currentValue; 201 {
202 currentValue = control.defaultValue;
203 }
204 this.customSections[i].content.controls[control.id] = currentValue;
188 } 205 }
189 else 206 else
190 { 207 {
@@ -198,7 +215,6 @@ exports.Content = Montage.create(Component, {
198 this.application.ninja.colorController.colorModel.input = "fill"; 215 this.application.ninja.colorController.colorModel.input = "fill";
199 } 216 }
200 217
201 debugger;
202 if(currentValue) 218 if(currentValue)
203 { 219 {
204 if(currentValue.mode === "gradient") 220 if(currentValue.mode === "gradient")
@@ -270,12 +286,6 @@ exports.Content = Montage.create(Component, {
270 286
271 e.units ? newValue = e.value + e.units : newValue = e.value; 287 e.units ? newValue = e.value + e.units : newValue = e.value;
272 288
273 if(e.prop === "border-width") {// || e.prop === "border-style") {
274 ElementsMediator.setProperty(this.application.ninja.selectedElements, "border-style", [this.customSections[0].content.controls.borderStyle], "Change", "pi");
275 } else if(e.prop === "border-style") {
276 ElementsMediator.setProperty(this.application.ninja.selectedElements, "border-width", [this.customSections[0].content.controls.borderWidth + "px"], "Change", "pi");
277 }
278
279 ElementsMediator.setProperty(this.application.ninja.selectedElements, e.prop, [newValue], "Change", "pi"); 289 ElementsMediator.setProperty(this.application.ninja.selectedElements, e.prop, [newValue], "Change", "pi");
280 290
281 } 291 }