aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/content.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties/content.reel')
-rwxr-xr-xjs/panels/properties/content.reel/content.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js
index fcd85675..72c02ffd 100755
--- a/js/panels/properties/content.reel/content.js
+++ b/js/panels/properties/content.reel/content.js
@@ -55,7 +55,6 @@ exports.Content = Montage.create(Component, {
55 } 55 }
56 56
57 this.eventManager.addEventListener("openDocument", this, false); 57 this.eventManager.addEventListener("openDocument", this, false);
58
59 this.eventManager.addEventListener("switchDocument", this, false); 58 this.eventManager.addEventListener("switchDocument", this, false);
60 } 59 }
61 }, 60 },
@@ -81,7 +80,7 @@ exports.Content = Montage.create(Component, {
81 // For now always assume that the stage is selected by default 80 // For now always assume that the stage is selected by default
82 if(this.application.ninja.selectedElements.length === 0) { 81 if(this.application.ninja.selectedElements.length === 0) {
83 this.displayStageProperties(); 82 this.displayStageProperties();
84 }else{ 83 }else {
85 if(this.application.ninja.selectedElements.length === 1) { 84 if(this.application.ninja.selectedElements.length === 1) {
86 this.displayElementProperties(this.application.ninja.selectedElements[0]._element); 85 this.displayElementProperties(this.application.ninja.selectedElements[0]._element);
87 } else { 86 } else {
@@ -173,6 +172,17 @@ exports.Content = Montage.create(Component, {
173 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); 172 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width"));
174 173
175 if(this.customPi !== stage.elementModel.pi) { 174 if(this.customPi !== stage.elementModel.pi) {
175 // We need to unregister color chips from the previous selection from the Color Model
176 var len = this.customSections.length;
177 for(var n = 0, controls; n < len; n++) {
178 controls = this.customSections[n].content.controls;
179 if(controls["colorSelect"]) {
180 controls["colorSelect"].destroy();
181 } else if(controls["stageBackground"]) {
182 controls["stageBackground"].destroy();
183 }
184 }
185
176 this.customPi = stage.elementModel.pi; 186 this.customPi = stage.elementModel.pi;
177 this.displayCustomProperties(stage, stage.elementModel.pi); 187 this.displayCustomProperties(stage, stage.elementModel.pi);
178 } 188 }
@@ -238,6 +248,17 @@ exports.Content = Montage.create(Component, {
238 248
239 // Custom Section 249 // Custom Section
240 if(this.customPi !== el.elementModel.pi) { 250 if(this.customPi !== el.elementModel.pi) {
251 // We need to unregister color chips from the previous selection from the Color Model
252 var len = this.customSections.length;
253 for(var n = 0, controls; n < len; n++) {
254 controls = this.customSections[n].content.controls;
255 if(controls["colorSelect"]) {
256 controls["colorSelect"].destroy();
257 } else if(controls["stageBackground"]) {
258 controls["stageBackground"].destroy();
259 }
260 }
261
241 this.customPi = el.elementModel.pi; 262 this.customPi = el.elementModel.pi;
242 this.displayCustomProperties(el, el.elementModel.pi); 263 this.displayCustomProperties(el, el.elementModel.pi);
243 } 264 }