Merge all changes from the naturaldocs sandbox. This brings all the work that
has been done in the NaturalDocs branch back to trunk. Thanks to everyone who helped out in making this happen. (I could list people, but the list would be long, and I'm already mentally on vacation.) git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,26 +4,36 @@
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Marker.js
|
||||
*
|
||||
* Class: OpenLayers.Marker.Box
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Marker>
|
||||
*/
|
||||
OpenLayers.Marker.Box = OpenLayers.Class.create();
|
||||
OpenLayers.Marker.Box.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Marker, {
|
||||
|
||||
/** @type OpenLayers.Bounds */
|
||||
bounds: null,
|
||||
/**
|
||||
* Property: bounds
|
||||
* {<OpenLayers.Bounds>}
|
||||
*/
|
||||
bounds: null,
|
||||
|
||||
/** @type DOMElement */
|
||||
div: null,
|
||||
/**
|
||||
* Property: div
|
||||
* {DOMElement}
|
||||
*/
|
||||
div: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* Constructor: OpenLayers.Marker.Box
|
||||
*
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* @param {String} borderColor
|
||||
* @param {int} borderWidth
|
||||
* Parameters:
|
||||
* bounds - {<OpenLayers.Bounds>}
|
||||
* borderColor - {String}
|
||||
* borderWidth - {int}
|
||||
*/
|
||||
initialize: function(bounds, borderColor, borderWidth) {
|
||||
this.bounds = bounds;
|
||||
@@ -34,7 +44,7 @@ OpenLayers.Marker.Box.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* Method: destroy
|
||||
*/
|
||||
destroy: function() {
|
||||
|
||||
@@ -44,10 +54,13 @@ OpenLayers.Marker.Box.prototype =
|
||||
OpenLayers.Marker.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
/** Allow the user to change the box's color and border width
|
||||
/**
|
||||
* Method: setBorder
|
||||
* Allow the user to change the box's color and border width
|
||||
*
|
||||
* @param {String} color Default is "red"
|
||||
* @param {int} width Default is 2
|
||||
* Parameters:
|
||||
* color - {String} Default is "red"
|
||||
* width - {int} Default is 2
|
||||
*/
|
||||
setBorder: function (color, width) {
|
||||
if (!color) {
|
||||
@@ -60,12 +73,15 @@ OpenLayers.Marker.Box.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
* @param {OpenLayers.Size} sz
|
||||
* Method: draw
|
||||
*
|
||||
* @return A new DOM Image with this marker<65>s icon set at the
|
||||
* Parameters:
|
||||
* px - {<OpenLayers.Pixel>}
|
||||
* sz - {<OpenLayers.Size>}
|
||||
*
|
||||
* Return:
|
||||
* {DOMElement} A new DOM Image with this marker<65>s icon set at the
|
||||
* location passed-in
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function(px, sz) {
|
||||
OpenLayers.Util.modifyDOMElement(this.div, null, px, sz);
|
||||
@@ -73,8 +89,10 @@ OpenLayers.Marker.Box.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns Whether or not the marker is currently visible on screen.
|
||||
* @type Boolean
|
||||
* Method: onScreen
|
||||
*
|
||||
* Rreturn:
|
||||
* {Boolean} Whether or not the marker is currently visible on screen.
|
||||
*/
|
||||
onScreen:function() {
|
||||
var onScreen = false;
|
||||
@@ -85,9 +103,12 @@ OpenLayers.Marker.Box.prototype =
|
||||
return onScreen;
|
||||
},
|
||||
|
||||
/** Hide or show the icon
|
||||
/**
|
||||
* Method: display
|
||||
* Hide or show the icon
|
||||
*
|
||||
* @param {Boolean} display
|
||||
* Parameters:
|
||||
* display - {Boolean}
|
||||
*/
|
||||
display: function(display) {
|
||||
this.div.style.display = (display) ? "" : "none";
|
||||
|
||||
Reference in New Issue
Block a user