Additional ndocs for geometry.move.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9072 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-17 18:26:15 +00:00
parent 576e931dac
commit b505822fd1
3 changed files with 15 additions and 9 deletions

View File

@@ -233,11 +233,13 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {
/**
* APIMethod: move
* Moves a collection in place
* Moves a geometry by the given displacement along positive x and y axes.
* This modifies the position of the geometry and clears the cached
* bounds.
*
* Parameters:
* x - {Float} The x-displacement (in map units)
* y - {Float} The y-displacement (in map units)
* x - {Float} Distance to move geometry in positive x direction.
* y - {Float} Distance to move geometry in positive y direction.
*/
move: function(x, y) {
for(var i=0, len=this.components.length; i<len; i++) {

View File

@@ -109,11 +109,13 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class(
/**
* APIMethod: move
* Moves a collection in place
* Moves a geometry by the given displacement along positive x and y axes.
* This modifies the position of the geometry and clears the cached
* bounds.
*
* Parameters:
* x - {Float} The x-displacement (in map units)
* y - {Float} The y-displacement (in map units)
* x - {Float} Distance to move geometry in positive x direction.
* y - {Float} Distance to move geometry in positive y direction.
*/
move: function(x, y) {
for(var i = 0, len=this.components.length; i<len - 1; i++) {

View File

@@ -156,11 +156,13 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, {
/**
* APIMethod: move
* Moves a point in place
* Moves a geometry by the given displacement along positive x and y axes.
* This modifies the position of the geometry and clears the cached
* bounds.
*
* Parameters:
* x - {Float}
* y - {Float}
* x - {Float} Distance to move geometry in positive x direction.
* y - {Float} Distance to move geometry in positive y direction.
*/
move: function(x, y) {
this.x = this.x + x;