aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-07 13:30:08 -0800
committerNivesh Rajbhandari2012-02-07 13:30:08 -0800
commit3a8875c288049b466bfeb8b7f0510fd8cbfb970d (patch)
treeebe632aa3960a5f93f89fbed22b8ef0ecd9f82e7 /js/components
parent8ad767b61460984a4031ba630f76ac8247a61857 (diff)
downloadninja-3a8875c288049b466bfeb8b7f0510fd8cbfb970d.tar.gz
Supporting switching materials in the PI. Also, moved makeFillMaterial and makeStrokeMaterial functions into GLGeomObj so shapes other than GLRectangle can use these routines.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/components')
-rw-r--r--js/components/combobox.reel/combobox.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js
index ebbfbffa..3200b01c 100644
--- a/js/components/combobox.reel/combobox.js
+++ b/js/components/combobox.reel/combobox.js
@@ -174,6 +174,22 @@ exports.Combobox = Montage.create(Component, {
174 174
175 prepareForDraw: { 175 prepareForDraw: {
176 value: function() { 176 value: function() {
177 if( (this._value === null) && this._items.length )
178 {
179 var current = this._items[0];
180 if(this.dataFunction)
181 {
182 this.value = this.dataFunction(current);
183 }
184 else if(this.dataField)
185 {
186 this.value = current[this.dataField];
187 }
188 else
189 {
190 this.value = current;
191 }
192 }
177 this.element.addEventListener("change", this, false); 193 this.element.addEventListener("change", this, false);
178 } 194 }
179 } 195 }