Changeset 2039
- Timestamp:
- 12/13/06 07:15:29 (2 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Marker/Box.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Marker/Box.js
r1721 r2039 11 11 OpenLayers.Marker.Box = OpenLayers.Class.create(); 12 12 OpenLayers.Marker.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Marker, { 13 /** @type OpenLayers.LonLat */ 13 14 /** @type OpenLayers.Bounds */ 14 15 bounds: null, 15 16 17 /** @type DOMElement */ 16 18 div: null, 17 19 18 20 /** 19 * @constructor 20 * 21 * @param {OpenLayers.Icon} icon 22 * @param {OpenLayers.LonLat lonlat 23 */ 21 * @constructor 22 * 23 * @param {OpenLayers.Bounds} bounds 24 * @param {String} borderColor 25 * @param {int} borderWidth 26 */ 24 27 initialize: function(bounds, borderColor, borderWidth) { 25 28 this.bounds = bounds; … … 30 33 }, 31 34 35 /** Allow the user to change the box's color and border width 36 * 37 * @param {String} color Default is "red" 38 * @param {int} width Default is 2 39 */ 32 40 setBorder: function (color, width) { 33 if (!color) color ="red";34 if (!width) width =2;41 color = color || "red"; 42 width = width || 2; 35 43 this.div.style.border = width + "px solid " + color; 36 44 }, … … 38 46 /** 39 47 * @param {OpenLayers.Pixel} px 48 * @param {OpenLayers.Size} sz 40 49 * 41 50 * @return A new DOM Image with this markerŽs icon set at the
