Changeset 1936

Show
Ignore:
Timestamp:
03/09/10 11:24:10 (5 months ago)
Author:
fvanderbiest
Message:

Measure ux: fixed bug where decimals=0 was not taken into account

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.Position.js

    r1932 r1936  
    3131     */ 
    3232    constructor: function(config) { 
    33         var scope = {decimals: config.decimals || 2}; 
     33        var scope = { 
     34            decimals: (config.hasOwnProperty('decimals')) ?  
     35                config.decimals : 2 
     36        }; 
    3437         
    3538        Ext.applyIf(config, { 
  • sandbox/fvanderbiest/geoext.ux/ux/Measure/lib/GeoExt.ux/Measure.js

    r1932 r1936  
    5959        if (typeof(config.template) == "string") { 
    6060            this.template = new Ext.XTemplate(config.template, { 
    61                 decimals: config.decimals || 2, 
     61                decimals: (config.hasOwnProperty('decimals')) ?  
     62                    config.decimals : 2, 
    6263                compiled: true 
    6364            });