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:
crschmidt
2007-06-29 15:59:20 +00:00
parent f1c61fd0d6
commit 3948913bfc
107 changed files with 8658 additions and 4011 deletions
+52 -31
View File
@@ -4,35 +4,44 @@
/**
* @class
*
* @requires OpenLayers/Popup.js
*
* Class: OpenLayers.Popup.Anchored
*
* Inherits from:
* - <OpenLayers.Popup>
*/
OpenLayers.Popup.Anchored = OpenLayers.Class.create();
OpenLayers.Popup.Anchored.prototype =
OpenLayers.Class.inherit( OpenLayers.Popup, {
/** "lr", "ll", "tr", "tl" - relative position of the popup.
* @type String */
/**
* Parameter: relativePosition
* {String} Relative position of the popup ("lr", "ll", "tr", or "tl")
*/
relativePosition: null,
/** Object which must have expose a 'size' (OpenLayers.Size) and
* 'offset' (OpenLayers.Pixel)
* @type Object */
/**
* Parameter: anchor
* {Object} Object to which we'll anchor the popup.
* Must expose a 'size' (<OpenLayers.Size>) and
* 'offset' (<OpenLayers.Pixel>)
*/
anchor: null,
/**
* @constructor
* Constructor: OpenLayers.Popup.Anchored
*
* @param {String} id
* @param {OpenLayers.LonLat} lonlat
* @param {OpenLayers.Size} size
* @param {String} contentHTML
* @param {Object} anchor Object which must expose a
* Parameters:
* id - {String}
* lonlat - {<OpenLayers.LonLat>}
* size - {<OpenLayers.Size>}
* contentHTML - {String}
* anchor - {Object} Object which must expose a
* - 'size' (OpenLayers.Size) and
* - 'offset' (OpenLayers.Pixel)
* (this is generally an OpenLayers.Icon)
* @param {Boolean} closeBox
* closeBox - {Boolean}
*/
initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) {
var newArguments = new Array(id, lonlat, size, contentHTML, closeBox);
@@ -44,11 +53,14 @@ OpenLayers.Popup.Anchored.prototype =
},
/**
* @param {OpenLayers.Pixel} px
*
* @returns Reference to a div that contains the drawn popup
* @type DOMElement
*/
* Method: draw
*
* Parameters:
* px - {<OpenLayers.Pixel>}
*
* Return:
* {DOMElement} Reference to a div that contains the drawn popup
*/
draw: function(px) {
if (px == null) {
if ((this.lonlat != null) && (this.map != null)) {
@@ -63,13 +75,14 @@ OpenLayers.Popup.Anchored.prototype =
},
/**
* @private
* Method: calculateRelativePosition
*
* @param {OpenLayers.Pixel} px
* Parameters:
* px - {<OpenLayers.Pixel>}
*
* @returns The relative position ("br" "tr" "tl "bl") at which the popup
* should be placed
* @type String
* Return:
* {String} The relative position ("br" "tr" "tl "bl") at which the popup
* should be placed
*/
calculateRelativePosition:function(px) {
var lonlat = this.map.getLonLatFromLayerPx(px);
@@ -81,7 +94,10 @@ OpenLayers.Popup.Anchored.prototype =
},
/**
* @param {OpenLayers.Pixel} px
* Method: moveTo
*
* Parameters:
* px - {<OpenLayers.Pixel>}
*/
moveTo: function(px) {
@@ -92,7 +108,10 @@ OpenLayers.Popup.Anchored.prototype =
},
/**
* @param {OpenLayers.Size} size
* Method: setSize
*
* Parameters:
* size - {<OpenLayers.Size>}
*/
setSize:function(size) {
OpenLayers.Popup.prototype.setSize.apply(this, arguments);
@@ -104,13 +123,14 @@ OpenLayers.Popup.Anchored.prototype =
},
/**
* @private
* Method: calculateNewPx
*
* @param {OpenLayers.Pixel} px
* Parameters:
* px - {<OpenLayers.Pixel>}
*
* @returns The the new px position of the popup on the screen
* relative to the passed-in px
* @type OpenLayers.Pixel
* Return:
* {<OpenLayers.Pixel>} The the new px position of the popup on the screen
* relative to the passed-in px
*/
calculateNewPx:function(px) {
var newPx = px.offset(this.anchor.offset);
@@ -124,5 +144,6 @@ OpenLayers.Popup.Anchored.prototype =
return newPx;
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Popup.Anchored"
});
+64 -37
View File
@@ -4,43 +4,57 @@
/**
* @class
*
* @requires OpenLayers/Popup/Anchored.js
*
* Class: OpenLayers.Popup.AnchoredBubble
*
* Inherits from:
* - <OpenLayers.Popup.Anchored>
*/
OpenLayers.Popup.AnchoredBubble = OpenLayers.Class.create();
//Border space for the rico corners
/**
* Constant: CORNER_SIZE
* {Integer} 5. Border space for the RICO corners
*/
OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5;
OpenLayers.Popup.AnchoredBubble.prototype =
OpenLayers.Class.inherit( OpenLayers.Popup.Anchored, {
/**
* Property: rounded
* {Boolean} Has the popup been rounded yet?
*/
rounded: false,
/**
* @constructor
*
* @param {String} id
* @param {OpenLayers.LonLat} lonlat
* @param {OpenLayers.Size} size
* @param {String} contentHTML
* @param {Object} anchor Object which must expose a
* - 'size' (OpenLayers.Size) and
* - 'offset' (OpenLayers.Pixel)
* (this is generally an OpenLayers.Icon)
* @param {Boolean} closeBox
*/
* Constructor: OpenLayers.Popup.AnchoredBubble
*
* Parameters:
* id - {String}
* lonlat - {<OpenLayers.LonLat>}
* size - {<OpenLayers.Size>}
* contentHTML - {String}
* anchor {Object} Object to which we'll anchor the popup.
* Must expose a 'size' (<OpenLayers.Size>) and
* 'offset' (<OpenLayers.Pixel>)
* (Note that this is generally an <OpenLayers.Icon>)
* closeBox {Boolean}
*/
initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) {
OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments);
},
/**
* @param {OpenLayers.Pixel} px
*
* @returns Reference to a div that contains the drawn popup
* @type DOMElement
*/
* Method: draw
*
* Parameters:
* px - {<OpenLayers.Pixel>}
*
* Return:
* {DOMElement} Reference to a div that contains the drawn popup
*/
draw: function(px) {
OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments);
@@ -58,8 +72,11 @@ OpenLayers.Popup.AnchoredBubble.prototype =
},
/**
* @param {OpenLayers.Size} size
*/
* APIMethod: setSize
*
* Parameters:
* size - {<OpenLayers.Size>}
*/
setSize:function(size) {
OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments);
@@ -81,7 +98,10 @@ OpenLayers.Popup.AnchoredBubble.prototype =
},
/**
* @param {String} color
* APIMethod: setBackgroundColor
*
* Parameters:
* color - {String}
*/
setBackgroundColor:function(color) {
if (color != undefined) {
@@ -97,7 +117,10 @@ OpenLayers.Popup.AnchoredBubble.prototype =
},
/**
* @param {float} opacity
* APIMethod: setOpacity
*
* Parameters:
* opacity - {float}
*/
setOpacity:function(opacity) {
if (opacity != undefined) {
@@ -111,22 +134,26 @@ OpenLayers.Popup.AnchoredBubble.prototype =
}
},
/** Bubble Popups can not have a border
/**
* Method: setBorder
*
* @param {int} border
* Always sets border to 0. Bubble Popups can not have a border.
*
* Parameters:
* border - {Integer}
*/
setBorder:function(border) {
this.border = 0;
},
/**
* @private
* Method: setRicoCorners
*
* @param {Boolean} firstTime Is this the first time the corners are being
* rounded?
*
* update the rico corners according to the popup's
* current relative postion
* Update RICO corners according to the popup's current relative postion.
*
* Parameters:
* firstTime - {Boolean} Is this the first time the corners are being
* rounded?
*/
setRicoCorners:function(firstTime) {
@@ -147,11 +174,10 @@ OpenLayers.Popup.AnchoredBubble.prototype =
},
/**
* @private
*
* @returns The proper corners string ("tr tl bl br") for rico
* to round
* @type String
* Method: getCornersToRound
*
* Return:
* {String} The proper corners string ("tr tl bl br") for rico to round
*/
getCornersToRound:function() {
@@ -164,5 +190,6 @@ OpenLayers.Popup.AnchoredBubble.prototype =
return corners.join(" ");
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Popup.AnchoredBubble"
});