From d5a7f1ef5cb1d95b02567c5ffe0c5075e634e463 Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 13 Dec 2006 13:15:29 +0000 Subject: [PATCH] updating jsdoc comments for accuracy git-svn-id: http://svn.openlayers.org/trunk/openlayers@2039 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Marker/Box.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/OpenLayers/Marker/Box.js b/lib/OpenLayers/Marker/Box.js index 05e3223e15..300c192346 100644 --- a/lib/OpenLayers/Marker/Box.js +++ b/lib/OpenLayers/Marker/Box.js @@ -10,17 +10,20 @@ */ OpenLayers.Marker.Box = OpenLayers.Class.create(); OpenLayers.Marker.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Marker, { - /** @type OpenLayers.LonLat */ + + /** @type OpenLayers.Bounds */ bounds: null, + /** @type DOMElement */ div: null, /** - * @constructor - * - * @param {OpenLayers.Icon} icon - * @param {OpenLayers.LonLat lonlat - */ + * @constructor + * + * @param {OpenLayers.Bounds} bounds + * @param {String} borderColor + * @param {int} borderWidth + */ initialize: function(bounds, borderColor, borderWidth) { this.bounds = bounds; this.div = OpenLayers.Util.createDiv(); @@ -29,14 +32,20 @@ OpenLayers.Marker.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Marker, { this.setBorder(borderColor, borderWidth); }, + /** Allow the user to change the box's color and border width + * + * @param {String} color Default is "red" + * @param {int} width Default is 2 + */ setBorder: function (color, width) { - if (!color) color = "red"; - if (!width) width = 2; + color = color || "red"; + width = width || 2; this.div.style.border = width + "px solid " + color; }, /** * @param {OpenLayers.Pixel} px + * @param {OpenLayers.Size} sz * * @return A new DOM Image with this markerīs icon set at the * location passed-in