Fix some problems in the documentation.

This commit is contained in:
Xavier Mamano
2012-03-05 11:43:09 +01:00
parent d3a4275136
commit bfb379f349
45 changed files with 106 additions and 58 deletions

View File

@@ -92,7 +92,7 @@ OpenLayers.Animation = (function(window) {
* Terminates an animation loop started with <start>. * Terminates an animation loop started with <start>.
* *
* Parameters: * Parameters:
* {Number} Identifier returned from <start>. * id - {Number} Identifier returned from <start>.
*/ */
function stop(id) { function stop(id) {
delete loops[id]; delete loops[id];

View File

@@ -187,7 +187,10 @@ OpenLayers.String = {
* APIFunction: numericIf * APIFunction: numericIf
* Converts a string that appears to be a numeric value into a number. * Converts a string that appears to be a numeric value into a number.
* *
* Returns * Parameters:
* value - {String}
*
* Returns:
* {Number|String} a Number if the passed value is a number, a String * {Number|String} a Number if the passed value is a number, a String
* otherwise. * otherwise.
*/ */

View File

@@ -35,7 +35,8 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, {
/** /**
* Property: layers * Property: layers
* {Array(<OpenLayers.Layer>)} * {String} Each character represents the state of the corresponding layer
* on the map.
*/ */
layers: null, layers: null,

View File

@@ -333,11 +333,11 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
}, },
/** /**
* Method selectHover * Method: selectHover
* Callback from the handlers.hover set up when <hover> selection is on * Callback from the handlers.hover set up when <hover> selection is on
* *
* Parameters: * Parameters:
* evt {Object} - event object with an xy property * evt - {Object} event object with an xy property
*/ */
selectHover: function(evt) { selectHover: function(evt) {
var bounds = this.pixelToBounds(evt.xy); var bounds = this.pixelToBounds(evt.xy);
@@ -459,7 +459,7 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
* Sets the multiple and toggle modifiers according to the current event * Sets the multiple and toggle modifiers according to the current event
* *
* Parameters: * Parameters:
* evt {<OpenLayers.Event>} * evt - {<OpenLayers.Event>}
*/ */
setModifiers: function(evt) { setModifiers: function(evt) {
this.modifiers = { this.modifiers = {

View File

@@ -616,7 +616,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
* the mouse is over a vertex. * the mouse is over a vertex.
* *
* Parameters: * Parameters:
* {Integer} Key code corresponding to the keypress event. * evt - {Event} Keypress event.
*/ */
handleKeypress: function(evt) { handleKeypress: function(evt) {
var code = evt.keyCode; var code = evt.keyCode;

View File

@@ -16,7 +16,7 @@
* current map view. By default it is drawn in the lower right corner of the * current map view. By default it is drawn in the lower right corner of the
* map. The href is updated as the map is zoomed, panned and whilst layers * map. The href is updated as the map is zoomed, panned and whilst layers
* are switched. * are switched.
* ` *
* Inherits from: * Inherits from:
* - <OpenLayers.Control> * - <OpenLayers.Control>
*/ */

View File

@@ -166,11 +166,11 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, {
* regular expression already. * regular expression already.
* *
* Parameters: * Parameters:
* wildCard - {<Char>} wildcard character in the above value, default * wildCard - {Char} wildcard character in the above value, default
* is "*" * is "*"
* singleChar - {<Char>) single-character wildcard in the above value * singleChar - {Char} single-character wildcard in the above value
* default is "." * default is "."
* escape - {<Char>) escape character in the above value, default is * escapeChar - {Char} escape character in the above value, default is
* "!" * "!"
* *
* Returns: * Returns:

View File

@@ -418,7 +418,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
* node - {DOMElement} An Atom entry or feed node. * node - {DOMElement} An Atom entry or feed node.
* *
* Returns: * Returns:
* An <OpenLayers.Feature.Vector>. * {<OpenLayers.Feature.Vector>}
*/ */
parseFeature: function(node) { parseFeature: function(node) {
var atomAttrib = {}; var atomAttrib = {};
@@ -554,7 +554,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
* node - {DOMElement} An Atom entry or feed node. * node - {DOMElement} An Atom entry or feed node.
* *
* Returns: * Returns:
* An Array of <OpenLayers.Feature.Vector>s. * Array({<OpenLayers.Feature.Vector>})
*/ */
parseFeatures: function(node) { parseFeatures: function(node) {
var features = []; var features = [];
@@ -578,7 +578,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
* node - {DOMElement} An Atom entry or feed node. * node - {DOMElement} An Atom entry or feed node.
* *
* Returns: * Returns:
* An Array of <OpenLayers.Geometry>s. * Array({<OpenLayers.Geometry>})
*/ */
parseLocations: function(node) { parseLocations: function(node) {
var georssns = this.namespaces.georss; var georssns = this.namespaces.georss;

View File

@@ -887,6 +887,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {
* (code) * (code)
* <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates> * <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
* (end) * (end)
*
* Parameters: * Parameters:
* geometry - {<OpenLayers.Geometry>} * geometry - {<OpenLayers.Geometry>}
* *

View File

@@ -615,7 +615,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, {
}, },
/** /**
* Function: setGeometryTypes * Method: setGeometryTypes
* Sets the <geometryTypes> mapping. * Sets the <geometryTypes> mapping.
*/ */
setGeometryTypes: function() { setGeometryTypes: function() {

View File

@@ -444,7 +444,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
}, },
/** /**
* Function: setGeometryTypes * Method: setGeometryTypes
* Sets the <geometryTypes> mapping. * Sets the <geometryTypes> mapping.
*/ */
setGeometryTypes: function() { setGeometryTypes: function() {

View File

@@ -102,7 +102,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
* doc - {Element} * doc - {Element}
* *
* Returns: * Returns:
* An Array of <OpenLayers.Feature.Vector>s * Array({<OpenLayers.Feature.Vector>})
*/ */
read: function(doc) { read: function(doc) {
if (typeof doc == "string") { if (typeof doc == "string") {

View File

@@ -287,7 +287,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
* <OpenLayers.Geometry>. * <OpenLayers.Geometry>.
* *
* Parameters: * Parameters:
* array {Object} The coordinates array from the GeoJSON fragment. * array - {Object} The coordinates array from the GeoJSON fragment.
* *
* Returns: * Returns:
* {<OpenLayers.Geometry>} A geometry. * {<OpenLayers.Geometry>} A geometry.

View File

@@ -90,7 +90,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
* doc - {Element} * doc - {Element}
* *
* Returns: * Returns:
* An Array of <OpenLayers.Feature.Vector>s * Array({<OpenLayers.Feature.Vector>})
*/ */
read: function(doc) { read: function(doc) {
if (typeof doc == "string") { if (typeof doc == "string") {

View File

@@ -72,7 +72,7 @@ OpenLayers.Format.Text = OpenLayers.Class(OpenLayers.Format, {
* text - {String} * text - {String}
* *
* Returns: * Returns:
* An Array of <OpenLayers.Feature.Vector>s * Array({<OpenLayers.Feature.Vector>})
*/ */
read: function(text) { read: function(text) {
var lines = text.split('\n'); var lines = text.split('\n');

View File

@@ -5,7 +5,9 @@
/** /**
* @requires OpenLayers/Format/XML.js * @requires OpenLayers/Format/XML.js
* */
/**
* Class: OpenLayers.Format.WFSDescribeFeatureType * Class: OpenLayers.Format.WFSDescribeFeatureType
* Read WFS DescribeFeatureType response * Read WFS DescribeFeatureType response
* *
@@ -145,8 +147,8 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
* Reads restriction defined in the child nodes of a restriction element * Reads restriction defined in the child nodes of a restriction element
* *
* Parameters: * Parameters:
* node {DOMElement} - the node to parse * node - {DOMElement} the node to parse
* obj {Object} - the object that receives the read result * obj - {Object} the object that receives the read result
*/ */
readRestriction: function(node, obj) { readRestriction: function(node, obj) {
var children = node.childNodes; var children = node.childNodes;

View File

@@ -1062,6 +1062,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
* elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL) * elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL)
* url - {String} URL string value * url - {String} URL string value
* attr - {Object} Optional attributes (width, height, format) * attr - {Object} Optional attributes (width, height, format)
*
* Returns: * Returns:
* {Element} A WMC element node. * {Element} A WMC element node.
*/ */

View File

@@ -190,7 +190,7 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
* criteria - {String} Search string which will match some part of a tagName * criteria - {String} Search string which will match some part of a tagName
* *
* Returns: * Returns:
* Array({DOMElement)) An array of sibling xml nodes * Array({DOMElement}) An array of sibling xml nodes
*/ */
getSiblingNodesByTagCriteria: function(node, criteria){ getSiblingNodesByTagCriteria: function(node, criteria){
var nodes = []; var nodes = [];

View File

@@ -407,7 +407,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
}, },
/** /**
* Method handleMapEvents * Method: handleMapEvents
* *
* Parameters: * Parameters:
* evt - {Object} * evt - {Object}

View File

@@ -35,7 +35,7 @@ OpenLayers.Lang = {
* Get the current language code. * Get the current language code.
* *
* Returns: * Returns:
* The current language code. * {String} The current language code.
*/ */
getCode: function() { getCode: function() {
if(!OpenLayers.Lang.code) { if(!OpenLayers.Lang.code) {

View File

@@ -56,10 +56,11 @@ OpenLayers.Layer.ArcGIS93Rest = OpenLayers.Class(OpenLayers.Layer.Grid, {
* url - {String} Base url for the ArcGIS server REST service * url - {String} Base url for the ArcGIS server REST service
* options - {Object} An object with key/value pairs representing the * options - {Object} An object with key/value pairs representing the
* options and option values. * options and option values.
*
* Valid Options: * Valid Options:
* format: {String} MIME type of desired image type. * format - {String} MIME type of desired image type.
* layers: {String} Comma-separated list of layers to display. * layers - {String} Comma-separated list of layers to display.
* srs: {String} Projection ID. * srs - {String} Projection ID.
*/ */
initialize: function(name, url, params, options) { initialize: function(name, url, params, options) {
var newArguments = []; var newArguments = [];

View File

@@ -272,7 +272,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* *
* Parameters: * Parameters:
* id - {String} The ArcIMS layer ID. * id - {String} The ArcIMS layer ID.
* queryDef - {Object} The query definition to apply to this layer. * querydef - {Object} The query definition to apply to this layer.
*/ */
setLayerQuery: function(id, querydef) { setLayerQuery: function(id, querydef) {
// find the matching layer, if it exists // find the matching layer, if it exists

View File

@@ -177,7 +177,7 @@ OpenLayers.Layer.Google = OpenLayers.Class(
* Hide or show the Layer * Hide or show the Layer
* *
* Parameters: * Parameters:
* display - {Boolean} * visible - {Boolean}
*/ */
display: function(visible) { display: function(visible) {
if (!this._dragging) { if (!this._dragging) {
@@ -190,7 +190,7 @@ OpenLayers.Layer.Google = OpenLayers.Class(
* Method: moveTo * Method: moveTo
* *
* Parameters: * Parameters:
* bound - {<OpenLayers.Bounds>} * bounds - {<OpenLayers.Bounds>}
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
* do some init work in that case. * do some init work in that case.
* dragging - {Boolean} * dragging - {Boolean}

View File

@@ -762,7 +762,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* resolution - {Number} * resolution - {Number}
* *
* Returns: * Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat, * {Object} containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety * tileoffsetlat, tileoffsetx, tileoffsety
*/ */
calculateGridLayout: function(bounds, origin, resolution) { calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -92,7 +92,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
* resolution - {Number} * resolution - {Number}
* *
* Returns: * Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat, * {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety * tileoffsetlat, tileoffsetx, tileoffsety
*/ */
calculateGridLayout: function(bounds, origin, resolution) { calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -449,7 +449,7 @@ OpenLayers.Layer.MapGuide = OpenLayers.Class(OpenLayers.Layer.Grid, {
* resolution - {Number} * resolution - {Number}
* *
* Returns: * Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat, * {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety * tileoffsetlat, tileoffsetx, tileoffsety
*/ */
calculateGridLayout: function(bounds, origin, resolution) { calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -936,7 +936,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
* attrValue - {Mixed} * attrValue - {Mixed}
* *
* Returns: * Returns:
* Array(<OpenLayers.Feature.Vector>) An array of features that have the * Array({<OpenLayers.Feature.Vector>}) An array of features that have the
* passed named attribute set to the given value. * passed named attribute set to the given value.
*/ */
getFeaturesByAttribute: function(attrName, attrValue) { getFeaturesByAttribute: function(attrName, attrValue) {

View File

@@ -296,7 +296,7 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* Method: moveTo * Method: moveTo
* *
* Parameters: * Parameters:
* bound - {<OpenLayers.Bounds>} * bounds - {<OpenLayers.Bounds>}
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
* do some init work in that case. * do some init work in that case.
* dragging - {Boolean} * dragging - {Boolean}

View File

@@ -261,7 +261,7 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
* resolution - {Number} * resolution - {Number}
* *
* Returns: * Returns:
* Object containing properties tilelon, tilelat, tileoffsetlat, * {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
* tileoffsetlat, tileoffsetx, tileoffsety * tileoffsetlat, tileoffsetx, tileoffsety
*/ */
calculateGridLayout: function(bounds, origin, resolution) { calculateGridLayout: function(bounds, origin, resolution) {

View File

@@ -2318,7 +2318,7 @@ OpenLayers.Map = OpenLayers.Class({
* Zoom to the full extent and recenter. * Zoom to the full extent and recenter.
* *
* Parameters: * Parameters:
* options - * options - {Object}
* *
* Allowed Options: * Allowed Options:
* restricted - {Boolean} True to zoom to restricted extent if it is * restricted - {Boolean} True to zoom to restricted extent if it is

View File

@@ -64,6 +64,7 @@ OpenLayers.Marker = OpenLayers.Class({
/** /**
* Constructor: OpenLayers.Marker * Constructor: OpenLayers.Marker
*
* Parameters: * Parameters:
* lonlat - {<OpenLayers.LonLat>} the position of this marker * lonlat - {<OpenLayers.LonLat>} the position of this marker
* icon - {<OpenLayers.Icon>} the icon for this marker * icon - {<OpenLayers.Icon>} the icon for this marker

View File

@@ -38,6 +38,7 @@
* Parameters: * Parameters:
* options - {Object} Optional object whose properties will be set on the * options - {Object} Optional object whose properties will be set on the
* instance. * instance.
*
* Valid options properties: * Valid options properties:
* url - {String} URL to send requests to (required). * url - {String} URL to send requests to (required).
* fois - {Array} The features of interest (required). * fois - {Array} The features of interest (required).

View File

@@ -340,7 +340,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
* Register a callback for a newly created script. * Register a callback for a newly created script.
* *
* Parameters: * Parameters:
* callback: {Function} The callback to be executed when the newly added * callback - {Function} The callback to be executed when the newly added
* script loads. This callback will be called with a single argument * script loads. This callback will be called with a single argument
* that is the JSON returned by the service. * that is the JSON returned by the service.
* *
@@ -361,7 +361,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
* Unregister a callback previously registered with the register function. * Unregister a callback previously registered with the register function.
* *
* Parameters: * Parameters:
* id: {Number} The identifer returned by the register function. * id - {Number} The identifer returned by the register function.
*/ */
o.unregister = function(id) { o.unregister = function(id) {
delete o.registry[id]; delete o.registry[id];

View File

@@ -54,6 +54,8 @@ OpenLayers.Protocol.WFS = function(options) {
* FeatureType at the same server url with the same typename. * FeatureType at the same server url with the same typename.
* options - {Object} Default properties to be set on the protocol. * options - {Object} Default properties to be set on the protocol.
* *
* Returns:
* {<OpenLayers.Protocol.WFS>}
*/ */
OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) { OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) {
var typeName, featurePrefix; var typeName, featurePrefix;

View File

@@ -170,7 +170,7 @@ OpenLayers.Renderer = OpenLayers.Class({
* Uses cached copy of resolution if available to minimize computing * Uses cached copy of resolution if available to minimize computing
* *
* Returns: * Returns:
* The current map's resolution * {Float} The current map's resolution
*/ */
getResolution: function() { getResolution: function() {
this.resolution = this.resolution || this.map.getResolution(); this.resolution = this.resolution || this.map.getResolution();

View File

@@ -78,7 +78,7 @@ OpenLayers.Strategy = OpenLayers.Class({
* Called to set the <layer> property. * Called to set the <layer> property.
* *
* Parameters: * Parameters:
* {<OpenLayers.Layer.Vector>} * layer - {<OpenLayers.Layer.Vector>}
*/ */
setLayer: function(layer) { setLayer: function(layer) {
this.layer = layer; this.layer = layer;

View File

@@ -214,7 +214,8 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
* Method: triggerRead * Method: triggerRead
* *
* Parameters: * Parameters:
* options - Additional options for the protocol's read method (optional) * options - {Object} Additional options for the protocol's read method
* (optional)
* *
* Returns: * Returns:
* {<OpenLayers.Protocol.Response>} The protocol response object * {<OpenLayers.Protocol.Response>} The protocol response object

View File

@@ -127,7 +127,7 @@ OpenLayers.Strategy.Filter = OpenLayers.Class(OpenLayers.Strategy, {
* added to the layer. Others will be cached by the strategy. * added to the layer. Others will be cached by the strategy.
* *
* Parameters: * Parameters:
* filter - <OpenLayers.Filter> A filter for evaluating features. * filter - {<OpenLayers.Filter>} A filter for evaluating features.
*/ */
setFilter: function(filter) { setFilter: function(filter) {
this.filter = filter; this.filter = filter;

View File

@@ -146,7 +146,7 @@ OpenLayers.Strategy.Paging = OpenLayers.Class(OpenLayers.Strategy, {
* Gets or sets page length. * Gets or sets page length.
* *
* Parameters: * Parameters:
* newLength: {Integer} Optional length to be set. * newLength - {Integer} Optional length to be set.
* *
* Returns: * Returns:
* {Integer} The length of a page (number of features per page). * {Integer} The length of a page (number of features per page).

View File

@@ -368,7 +368,7 @@ OpenLayers.Style = OpenLayers.Class({
* geometry type of the passed geometry * geometry type of the passed geometry
* *
* Parameters: * Parameters:
* geometry {<OpenLayers.Geometry>} * geometry - {<OpenLayers.Geometry>}
* *
* Returns: * Returns:
* {String} key of the according symbolizer * {String} key of the according symbolizer

View File

@@ -117,7 +117,9 @@ OpenLayers.Tile = OpenLayers.Class({
/** TBD 3.0 -- remove 'url' from the list of parameters to the constructor. /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor.
* there is no need for the base tile class to have a url. * there is no need for the base tile class to have a url.
* */
/**
* Constructor: OpenLayers.Tile * Constructor: OpenLayers.Tile
* Constructor for a new <OpenLayers.Tile> instance. * Constructor for a new <OpenLayers.Tile> instance.
* *

View File

@@ -102,7 +102,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
/** TBD 3.0 - reorder the parameters to the init function to remove /** TBD 3.0 - reorder the parameters to the init function to remove
* URL. the getUrl() function on the layer gets called on * URL. the getUrl() function on the layer gets called on
* each draw(), so no need to specify it here. * each draw(), so no need to specify it here.
* */
/**
* Constructor: OpenLayers.Tile.Image * Constructor: OpenLayers.Tile.Image
* Constructor for a new <OpenLayers.Tile.Image> instance. * Constructor for a new <OpenLayers.Tile.Image> instance.
* *

View File

@@ -179,6 +179,9 @@ OpenLayers.Easing.Linear = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeIn: function(t, b, c, d) { easeIn: function(t, b, c, d) {
return c*t/d + b; return c*t/d + b;
@@ -192,6 +195,9 @@ OpenLayers.Easing.Linear = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeOut: function(t, b, c, d) { easeOut: function(t, b, c, d) {
return c*t/d + b; return c*t/d + b;
@@ -205,6 +211,9 @@ OpenLayers.Easing.Linear = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeInOut: function(t, b, c, d) { easeInOut: function(t, b, c, d) {
return c*t/d + b; return c*t/d + b;
@@ -226,6 +235,9 @@ OpenLayers.Easing.Expo = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeIn: function(t, b, c, d) { easeIn: function(t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
@@ -239,6 +251,9 @@ OpenLayers.Easing.Expo = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeOut: function(t, b, c, d) { easeOut: function(t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
@@ -252,6 +267,9 @@ OpenLayers.Easing.Expo = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeInOut: function(t, b, c, d) { easeInOut: function(t, b, c, d) {
if (t==0) return b; if (t==0) return b;
@@ -276,6 +294,9 @@ OpenLayers.Easing.Quad = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeIn: function(t, b, c, d) { easeIn: function(t, b, c, d) {
return c*(t/=d)*t + b; return c*(t/=d)*t + b;
@@ -289,6 +310,9 @@ OpenLayers.Easing.Quad = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeOut: function(t, b, c, d) { easeOut: function(t, b, c, d) {
return -c *(t/=d)*(t-2) + b; return -c *(t/=d)*(t-2) + b;
@@ -302,6 +326,9 @@ OpenLayers.Easing.Quad = {
* b - {Float} beginning position * b - {Float} beginning position
* c - {Float} total change * c - {Float} total change
* d - {Float} duration of the transition * d - {Float} duration of the transition
*
* Returns:
* {Float}
*/ */
easeInOut: function(t, b, c, d) { easeInOut: function(t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b; if ((t/=d/2) < 1) return c/2*t*t + b;

View File

@@ -933,7 +933,7 @@ OpenLayers.Util.lastSeqID = 0;
* prefix (defaults to "id_") appended with the counter value. * prefix (defaults to "id_") appended with the counter value.
* *
* Parameters: * Parameters:
* prefix {String} Optionsal string to prefix unique id. Default is "id_". * prefix - {String} Optional string to prefix unique id. Default is "id_".
* *
* Returns: * Returns:
* {String} A unique id string, built on the passed in prefix. * {String} A unique id string, built on the passed in prefix.
@@ -1250,6 +1250,9 @@ OpenLayers.Util.pagePosition = function(forElement) {
* document.body or document.documentElement, depending on the document's * document.body or document.documentElement, depending on the document's
* compatibility mode (see * compatibility mode (see
* http://code.google.com/p/doctype/wiki/ArticleClientViewportElement) * http://code.google.com/p/doctype/wiki/ArticleClientViewportElement)
*
* Returns:
* {DOMElement}
*/ */
OpenLayers.Util.getViewportElement = function() { OpenLayers.Util.getViewportElement = function() {
var viewportElement = arguments.callee.viewportElement; var viewportElement = arguments.callee.viewportElement;