Changeset 2040
- 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:
- trunk/openlayers/lib/OpenLayers/Marker/Box.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Marker/Box.js
r2039 r2040 10 10 */ 11 11 OpenLayers.Marker.Box = OpenLayers.Class.create(); 12 OpenLayers.Marker.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Marker, { 12 OpenLayers.Marker.Box.prototype = 13 OpenLayers.Class.inherit( OpenLayers.Marker, { 13 14 14 15 /** @type OpenLayers.Bounds */ … … 39 40 */ 40 41 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 } 43 48 this.div.style.border = width + "px solid " + color; 44 49 },
Download in other formats:
