[fusion-commits] r1820 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Mar 12 16:46:58 EDT 2009


Author: madair
Date: 2009-03-12 16:46:58 -0400 (Thu, 12 Mar 2009)
New Revision: 1820

Modified:
   trunk/widgets/ColorPicker.js
Log:
closes #225: updates to ColorPicker.js for new version of Jx

Modified: trunk/widgets/ColorPicker.js
===================================================================
--- trunk/widgets/ColorPicker.js	2009-03-12 20:24:08 UTC (rev 1819)
+++ trunk/widgets/ColorPicker.js	2009-03-12 20:46:58 UTC (rev 1820)
@@ -63,12 +63,13 @@
     
     setUiObject: function(uiObj) {
         Fusion.Widget.prototype.setUiObject.apply(this, [uiObj]);
-        this.uiObj.addEvent('colorChange', OpenLayers.Function.bind(this.colorChanged, this));
+        this.uiObj.setColor(this.color);
+        this.uiObj.addEvent('change', OpenLayers.Function.bind(this.colorChanged, this));
     },
     
     colorChanged: function(button) {
-        var a = parseInt(this.uiObj.alpha*255/100).toString(16);
-        var c = a + this.uiObj.color.substring(1);
+        var a = parseInt(button.options.alpha*255/100).toString(16);
+        var c = a + button.options.color.substring(1);
         if (this.colorInput) {
             this.colorInput.value = c;
         }



More information about the fusion-commits mailing list