[OpenLayers-Commits] r2039 - trunk/openlayers/lib/OpenLayers/Marker
commits at openlayers.org
commits at openlayers.org
Wed Dec 13 08:15:30 EST 2006
Author: euzuro
Date: 2006-12-13 08:15:29 -0500 (Wed, 13 Dec 2006)
New Revision: 2039
Modified:
trunk/openlayers/lib/OpenLayers/Marker/Box.js
Log:
updating jsdoc comments for accuracy
Modified: trunk/openlayers/lib/OpenLayers/Marker/Box.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Marker/Box.js 2006-12-12 16:58:55 UTC (rev 2038)
+++ trunk/openlayers/lib/OpenLayers/Marker/Box.js 2006-12-13 13:15:29 UTC (rev 2039)
@@ -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 @@
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
More information about the Commits
mailing list