Commit documentation changes from gstamp, patch from #869.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
* Whether or not a string starts with another string.
|
* Whether or not a string starts with another string.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* sStart - {Sring}
|
* sStart - {Sring} The string we're testing for.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Boolean} Whether or not this string starts with the string passed in.
|
* {Boolean} Whether or not this string starts with the string passed in.
|
||||||
@@ -33,7 +33,7 @@ String.prototype.startsWith = function(sStart) {
|
|||||||
* Whether or not a string contains another string.
|
* Whether or not a string contains another string.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* str - {String}
|
* str - {String} The string that we're testing for.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Boolean} Whether or not this string contains with the string passed in.
|
* {Boolean} Whether or not this string contains with the string passed in.
|
||||||
@@ -143,12 +143,14 @@ Number.prototype.limitSigDigs = function(sig) {
|
|||||||
/**
|
/**
|
||||||
* APIMethod: Function.bind
|
* APIMethod: Function.bind
|
||||||
* Bind a function to an object.
|
* Bind a function to an object.
|
||||||
|
* Method to easily create closures with 'this' altered.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* object - {Object}
|
* object - {Object} the this parameter
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Function}
|
* {Function} A closure with 'this' altered to the first
|
||||||
|
* argument.
|
||||||
*/
|
*/
|
||||||
Function.prototype.bind = function() {
|
Function.prototype.bind = function() {
|
||||||
var __method = this;
|
var __method = this;
|
||||||
@@ -173,7 +175,7 @@ Function.prototype.bind = function() {
|
|||||||
* as first parameter when called.
|
* as first parameter when called.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* object - {Object}
|
* object - {Object} A reference to this.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Function}
|
* {Function}
|
||||||
|
|||||||
@@ -293,9 +293,11 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: setName
|
* APIMethod: setName
|
||||||
|
* Sets the new layer name for this layer. Can trigger
|
||||||
|
* a changelayer event on the map.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* newName - {String}
|
* newName - {String} The new name.
|
||||||
*/
|
*/
|
||||||
setName: function(newName) {
|
setName: function(newName) {
|
||||||
if (newName != this.name) {
|
if (newName != this.name) {
|
||||||
|
|||||||
@@ -127,13 +127,18 @@ OpenLayers.Util.indexOf = function(array, obj) {
|
|||||||
/**
|
/**
|
||||||
* Function: modifyDOMElement
|
* Function: modifyDOMElement
|
||||||
*
|
*
|
||||||
|
* Modifies many properties of a DOM element all at once. Passing in
|
||||||
|
* null to an individual parameter will avoid setting the attribute.
|
||||||
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* id - {String}
|
* id - {String} The element id attribute to set.
|
||||||
* px - {<OpenLayers.Pixel>}
|
* px - {<OpenLayers.Pixel>} The left and top style position.
|
||||||
* sz - {<OpenLayers.Size>}
|
* sz - {<OpenLayers.Size>} The width and height style attributes.
|
||||||
* position - {String}
|
* position - {String} The position attribute. eg: absolute,
|
||||||
* border - {String}
|
* relative, etc.
|
||||||
* overflow - {String}
|
* border - {String} The style.border attribute. eg:
|
||||||
|
* solid black 2px
|
||||||
|
* overflow - {String} The style.overview attribute.
|
||||||
* opacity - {Float} Fractional value (0.0 - 1.0)
|
* opacity - {Float} Fractional value (0.0 - 1.0)
|
||||||
*/
|
*/
|
||||||
OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
|
OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
|
||||||
@@ -167,17 +172,25 @@ OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: createDiv
|
* Function: createDiv
|
||||||
|
* Creates a new div and optionally set some standard attributes.
|
||||||
|
* Null may be passed to each parameter if you do not wish to
|
||||||
|
* set a particular attribute.d
|
||||||
*
|
*
|
||||||
* Note: zIndex is NOT set
|
* Note: zIndex is NOT set
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* id - {String}
|
* id - {String} An identifier for this element. If no id is
|
||||||
* px - {<OpenLayers.Pixel>}
|
* passed an identifier will be created
|
||||||
* sz - {<OpenLayers.Size>}
|
* automatically.
|
||||||
* imgURL - {String}
|
* px - {<OpenLayers.Pixel>} The element left and top position.
|
||||||
* position - {String}
|
* sz - {<OpenLayers.Size>} The element width and height.
|
||||||
* border - {String}
|
* imgURL - {String} A url pointing to an image to use as a
|
||||||
* overflow - {String}
|
* background image.
|
||||||
|
* position - {String} The style.position value. eg: absolute,
|
||||||
|
* relative etc.
|
||||||
|
* border - {String} The the style.border value.
|
||||||
|
* eg: 2px solid black
|
||||||
|
* overflow - {String} The style.overflow value. Eg. hidden
|
||||||
* opacity - {Float} Fractional value (0.0 - 1.0)
|
* opacity - {Float} Fractional value (0.0 - 1.0)
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@@ -207,15 +220,18 @@ OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: createImage
|
* Function: createImage
|
||||||
|
* Creates an img element with specific attribute values.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* id - {String}
|
* id - {String} The id field for the img. If none assigned one will be
|
||||||
* px - {<OpenLayers.Pixel>}
|
* automatically generated.
|
||||||
* sz - {<OpenLayers.Size>}
|
* px - {<OpenLayers.Pixel>} The left and top positions.
|
||||||
* imgURL - {String}
|
* sz - {<OpenLayers.Size>} The style.width and style.height values.
|
||||||
* position - {String}
|
* imgURL - {String} The url to use as the image source.
|
||||||
* border - {String}
|
* position - {String} The style.position value.
|
||||||
* delayDisplay - {Boolean}
|
* border - {String} The border to place around the image.
|
||||||
|
* delayDisplay - {Boolean} If true waits until the image has been
|
||||||
|
* loaded.
|
||||||
* opacity - {Float} Fractional value (0.0 - 1.0)
|
* opacity - {Float} Fractional value (0.0 - 1.0)
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@@ -333,9 +349,12 @@ OpenLayers.Util.onImageLoadError = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: alphaHack
|
* Function: alphaHack
|
||||||
|
* Checks whether it's necessary (and possible) to use the png alpha
|
||||||
|
* hack which allows alpha transparency for png images under Internet
|
||||||
|
* Explorer.
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Boolean}
|
* {Boolean} true if alpha has is necessary and possible, false otherwise.
|
||||||
*/
|
*/
|
||||||
OpenLayers.Util.alphaHack = function() {
|
OpenLayers.Util.alphaHack = function() {
|
||||||
var arVersion = navigator.appVersion.split("MSIE");
|
var arVersion = navigator.appVersion.split("MSIE");
|
||||||
@@ -804,7 +823,7 @@ OpenLayers.Util.lastSeqID = 0;
|
|||||||
* Function: createUniqueID
|
* Function: createUniqueID
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* prefix {String} String to prefix random id.
|
* prefix {String} String to prefix unique id.
|
||||||
* If null, default is "id_"
|
* If null, default is "id_"
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@@ -843,7 +862,7 @@ OpenLayers.DOTS_PER_INCH = 72;
|
|||||||
* Function: normalzeScale
|
* Function: normalzeScale
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* scale {float}
|
* scale - {float}
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Float} A normalized scale value, in 1 / X format.
|
* {Float} A normalized scale value, in 1 / X format.
|
||||||
@@ -925,6 +944,7 @@ OpenLayers.Util.safeStopPropagation = function(evt) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: pagePositon
|
* Function: pagePositon
|
||||||
|
* Calculates the position of an element on the page.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* forElement - {DOMElement}
|
* forElement - {DOMElement}
|
||||||
@@ -1045,7 +1065,10 @@ OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* url - {String}
|
* url - {String}
|
||||||
* options - {Object}
|
* options - {Object} A hash of options. Can be one of:
|
||||||
|
* ignoreCase: lowercase url,
|
||||||
|
* ignorePort80: don't include explicit port if port is 80,
|
||||||
|
* ignoreHash: Don't include part of url after the hash (#).
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {Object} An object with separate url, a, port, host, and args parsed out
|
* {Object} An object with separate url, a, port, host, and args parsed out
|
||||||
@@ -1153,9 +1176,10 @@ OpenLayers.Util.createUrlObject = function(url, options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: removeTail
|
* Function: removeTail
|
||||||
|
* Takes a url and removes everything after the ? and #
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* url - {String}
|
* url - {String} The url to process
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* {String} The string with all queryString and Hash removed
|
* {String} The string with all queryString and Hash removed
|
||||||
|
|||||||
Reference in New Issue
Block a user