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

View File

@@ -3,25 +3,38 @@
* for the full text of the license. */
/**
* @class
*
* @requires OpenLayers/Geometry.js
*
* Class: OpenLayers.Geometry.Point
* Point geometry class.
*
* Inherits from:
* - <OpenLayers.Geometry>
*/
OpenLayers.Geometry.Point = OpenLayers.Class.create();
OpenLayers.Geometry.Point.prototype =
OpenLayers.Class.inherit(OpenLayers.Geometry, {
/** @type float */
/**
* APIProperty: x
* {float}
*/
x: null,
/** @type float */
/**
* APIProperty: y
* {float}
*/
y: null,
/**
* @constructor
* Constructor: OpenLayers.Geometry.Point
* Construct a point geometry.
*
* @param {float} x
* @param {float} y
* Parameters:
* x - {float}
* y - {float}
*
*/
initialize: function(x, y) {
OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
@@ -31,8 +44,10 @@ OpenLayers.Geometry.Point.prototype =
},
/**
* @returns An exact clone of this OpenLayers.Geometry.Point
* @type OpenLayers.Geometry.Point
* APIMethod: clone
*
* Return:
* {<OpenLayers.Geometry.Point>} An exact clone of this OpenLayers.Geometry.Point
*/
clone: function(obj) {
if (obj == null) {
@@ -45,8 +60,9 @@ OpenLayers.Geometry.Point.prototype =
return obj;
},
/** Create a new Bounds based on the lon/lat
*
/**
* Method: calculateBounds
* Create a new Bounds based on the lon/lat
*/
calculateBounds: function () {
this.bounds = new OpenLayers.Bounds(this.x, this.y,
@@ -54,7 +70,10 @@ OpenLayers.Geometry.Point.prototype =
},
/**
* @param {OpenLayers.Geometry.Point} point
* APIMethod: distanceTo
*
* Parameters:
* point - {<OpenLayers.Geometry.Point>}
*/
distanceTo: function(point) {
var distance = 0.0;
@@ -69,12 +88,16 @@ OpenLayers.Geometry.Point.prototype =
},
/**
* @param {OpenLayers.Geometry} xy
* @returns Boolean value indicating whether the passed-in
* OpenLayers.Geometryobject has the same components as this
* APIMethod: equals
*
* Parameters:
* xy - {<OpenLayers.Geometry>}
*
* Return:
* {Boolean} Boolean value indicating whether the passed-in
* {<OpenLayers.Geometry>} object has the same components as this
* note that if ll passed in is null, returns false
*
* @type bool
*/
equals:function(geom) {
var equals = false;
@@ -86,24 +109,31 @@ OpenLayers.Geometry.Point.prototype =
},
/**
* @return Shortened String representation of Point object.
* Method: toShortString
*
* Return:
* {String} Shortened String representation of Point object.
* (ex. <i>"5, 42"</i>)
* @type String
*/
toShortString: function() {
return (this.x + ", " + this.y);
},
/**
* APIMethod: move
* Moves a point in place
* @param {Float} x
* @param {Float} y
*
* Parameters:
* x - {Float}
* y - {Float}
*/
move: function(x, y) {
this.x = this.x + x;
this.y = this.y + y;
},
/** @final @type String */
/** Constant: CLASS_NAME
* {String} Name of this class
*/
CLASS_NAME: "OpenLayers.Geometry.Point"
});