aboutsummaryrefslogtreecommitdiff
path: root/js/components/combobox.reel
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-07 15:25:11 -0800
committerNivesh Rajbhandari2012-02-07 15:25:11 -0800
commit329a859e2666716c3a1d99c6bd2679e10c81fc8d (patch)
tree4bc3b2c0570d4d19572e756897d8f3a29abc3d71 /js/components/combobox.reel
parentaec849d91e4b697d496b9ede28b5d89cf2283781 (diff)
downloadninja-329a859e2666716c3a1d99c6bd2679e10c81fc8d.tar.gz
Added ability to toggle combobox's visibility so we can show/hide materials comboboxes in the tool options.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/components/combobox.reel')
-rw-r--r--js/components/combobox.reel/combobox.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js
index 3200b01c..bc433f52 100644
--- a/js/components/combobox.reel/combobox.js
+++ b/js/components/combobox.reel/combobox.js
@@ -104,6 +104,26 @@ exports.Combobox = Montage.create(Component, {
104 } 104 }
105 }, 105 },
106 106
107 _visible: {
108 enumerable: false,
109 value: true
110 },
111
112 visible: {
113 enumerable: true,
114 serializable: true,
115 get: function() {
116 return this._visible;
117 },
118 set: function(value) {
119 if(value !== this._visible)
120 {
121 this._visible = value;
122 this.needsDraw = true;
123 }
124 }
125 },
126
107 handleChange: 127 handleChange:
108 { 128 {
109 value:function(event) 129 value:function(event)
@@ -158,6 +178,14 @@ exports.Combobox = Montage.create(Component, {
158 this.element.appendChild(optionItem); 178 this.element.appendChild(optionItem);
159 } 179 }
160 this.element.disabled = !this._enabled; 180 this.element.disabled = !this._enabled;
181 if(this._visible)
182 {
183 this.element.style.visibility = "visible";
184 }
185 else
186 {
187 this.element.style.visibility = "hidden";
188 }
161 } 189 }
162 } 190 }
163 }, 191 },