aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui
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/components/ui
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/components/ui')
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js
index ed1ac27a..7a7411da 100755
--- a/js/components/ui/color-chip.reel/color-chip.js
+++ b/js/components/ui/color-chip.reel/color-chip.js
@@ -92,6 +92,21 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
92 this.changeDelegate(evt); 92 this.changeDelegate(evt);
93 } 93 }
94 } 94 }
95 },
96
97 destroy: {
98 value: function() {
99 this.application.ninja.colorController.removeButton(this.mode, this.chipBtn);
100 var mode = this.mode;
101 if(this.iconType) {
102 if(this.iconType === "fillIcon") {
103 mode = "fill";
104 } else if(this.iconType === "strokeIcon") {
105 mode = "stroke";
106 }
107 }
108 this.application.ninja.colorController.removeButton(mode, this.icon);
109 }
95 } 110 }
96 111
97}); 112});