aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/content.reel
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-28 17:19:42 -0800
committerNivesh Rajbhandari2012-02-28 17:19:42 -0800
commit209e0781e926212bbaaad9e8ca4b61a0c389b30f (patch)
tree322884e4f54aed9af2da96b30ddb87e7e51b19d1 /js/panels/properties/content.reel
parent7c9291a5bab4abd849547f8878f6fb962fc88250 (diff)
downloadninja-209e0781e926212bbaaad9e8ca4b61a0c389b30f.tar.gz
We need to remove color buttons from the color model when updating the PI for selection change.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/panels/properties/content.reel')
-rwxr-xr-xjs/panels/properties/content.reel/content.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js
index 8fa33a75..58c37db4 100755
--- a/js/panels/properties/content.reel/content.js
+++ b/js/panels/properties/content.reel/content.js
@@ -156,6 +156,17 @@ exports.Content = Montage.create(Component, {
156 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); 156 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width"));
157 157
158 if(this.customPi !== stage.elementModel.pi) { 158 if(this.customPi !== stage.elementModel.pi) {
159 // We need to unregister color chips from the previous selection from the Color Model
160 var len = this.customSections.length;
161 for(var n = 0, controls; n < len; n++) {
162 controls = this.customSections[n].content.controls;
163 if(controls["colorSelect"]) {
164 controls["colorSelect"].destroy();
165 } else if(controls["stageBackground"]) {
166 controls["stageBackground"].destroy();
167 }
168 }
169
159 this.customPi = stage.elementModel.pi; 170 this.customPi = stage.elementModel.pi;
160 this.displayCustomProperties(stage, stage.elementModel.pi); 171 this.displayCustomProperties(stage, stage.elementModel.pi);
161 } 172 }
@@ -221,6 +232,17 @@ exports.Content = Montage.create(Component, {
221 232
222 // Custom Section 233 // Custom Section
223 if(this.customPi !== el.elementModel.pi) { 234 if(this.customPi !== el.elementModel.pi) {
235 // We need to unregister color chips from the previous selection from the Color Model
236 var len = this.customSections.length;
237 for(var n = 0, controls; n < len; n++) {
238 controls = this.customSections[n].content.controls;
239 if(controls["colorSelect"]) {
240 controls["colorSelect"].destroy();
241 } else if(controls["stageBackground"]) {
242 controls["stageBackground"].destroy();
243 }
244 }
245
224 this.customPi = el.elementModel.pi; 246 this.customPi = el.elementModel.pi;
225 this.displayCustomProperties(el, el.elementModel.pi); 247 this.displayCustomProperties(el, el.elementModel.pi);
226 } 248 }