OpenLayers OpenLayers

Changeset 2040

Show
Ignore:
Timestamp:
12/13/06 08:22:47 (2 years ago)
Author:
euzuro
Message:

r2039 contained a small stylistic change that I thought was insignificant but upon further reflection is not. the '' style is beautiful, but it breaks if a 0, , or 'false' value is specified (as they all evaluate to false, and thus the default is taken). So if the user wants to specify a 0-width border, s/he cannot. This commit reverts to how it previously was, with the addition of {} as per OL coding standards. Also the addition of one small line break, also for coding standards

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Marker/Box.js

    r2039 r2040  
    1010 */ 
    1111OpenLayers.Marker.Box = OpenLayers.Class.create(); 
    12 OpenLayers.Marker.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Marker, { 
     12OpenLayers.Marker.Box.prototype =  
     13  OpenLayers.Class.inherit( OpenLayers.Marker, { 
    1314 
    1415    /** @type OpenLayers.Bounds */ 
     
    3940     */ 
    4041    setBorder: function (color, width) { 
    41         color = color || "red"; 
    42         width = width || 2; 
     42        if (!color) { 
     43            color = "red"; 
     44        } 
     45        if (!width) { 
     46            width = 2; 
     47        } 
    4348        this.div.style.border = width + "px solid " + color; 
    4449    },