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:
@@ -3,30 +3,39 @@
|
||||
* for the full text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @requires OpenLayers/Geometry/Curve.js
|
||||
*
|
||||
* Class: OpenLayers.Geometry.LineString
|
||||
* A LineString is a Curve which, once two points have been added to it, can
|
||||
* never be less than two points long.
|
||||
*
|
||||
* @requires OpenLayers/Geometry/Curve.js
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Geometry.Curve>
|
||||
*/
|
||||
OpenLayers.Geometry.LineString = OpenLayers.Class.create();
|
||||
OpenLayers.Geometry.LineString.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Geometry.Curve, {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {Array(OpenLayers.Geometry.Point)} points
|
||||
* Constructor: OpenLayers.Geometry.LineString
|
||||
* Create a new LineString geometry
|
||||
*
|
||||
* Parameters:
|
||||
* points - {Array(<OpenLayers.Geometry.Point>)} An array of points used to
|
||||
* generate the linestring
|
||||
*
|
||||
*/
|
||||
initialize: function(points) {
|
||||
OpenLayers.Geometry.Curve.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/** Only allows removal of a point if there are three or more points in
|
||||
* the linestring. (otherwise the result would be just a single point)
|
||||
*
|
||||
* @param {OpenLayers.Geometry.Point} point
|
||||
/**
|
||||
* APIMethod: removeComponent
|
||||
* Only allows removal of a point if there are three or more points in
|
||||
* the linestring. (otherwise the result would be just a single point)
|
||||
*
|
||||
* Parameters:
|
||||
* point - {<OpenLayers.Geometry.Point>} The point to be removed
|
||||
*/
|
||||
removeComponent: function(point) {
|
||||
if ( this.components && (this.components.length > 2)) {
|
||||
@@ -35,6 +44,9 @@ OpenLayers.Geometry.LineString.prototype =
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
/**
|
||||
* Constant: CLASS_NAME
|
||||
* {String} Name of class.
|
||||
*/
|
||||
CLASS_NAME: "OpenLayers.Geometry.LineString"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user