[Commits] r1936 - sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux

commits at geoext.org commits at geoext.org
Tue Mar 9 11:24:10 CET 2010


Author: fvanderbiest
Date: 2010-03-09 11:24:10 +0100 (Tue, 09 Mar 2010)
New Revision: 1936

Modified:
   sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.Position.js
   sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.js
Log:
Measure ux: fixed bug where decimals=0 was not taken into account

Modified: sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.Position.js
===================================================================
--- sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.Position.js	2010-03-09 08:53:58 UTC (rev 1935)
+++ sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.Position.js	2010-03-09 10:24:10 UTC (rev 1936)
@@ -30,7 +30,10 @@
     /** private: method[constructor]
      */
     constructor: function(config) {
-        var scope = {decimals: config.decimals || 2};
+        var scope = {
+            decimals: (config.hasOwnProperty('decimals')) ? 
+                config.decimals : 2
+        };
         
         Ext.applyIf(config, {
             iconCls: 'gx-map-measureposition',

Modified: sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.js
===================================================================
--- sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.js	2010-03-09 08:53:58 UTC (rev 1935)
+++ sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.js	2010-03-09 10:24:10 UTC (rev 1936)
@@ -58,7 +58,8 @@
         delete config.styleMap;
         if (typeof(config.template) == "string") {
             this.template = new Ext.XTemplate(config.template, {
-                decimals: config.decimals || 2,
+                decimals: (config.hasOwnProperty('decimals')) ? 
+                    config.decimals : 2,
                 compiled: true
             });
         } else if (config.template instanceof Ext.XTemplate) {



More information about the Commits mailing list