Tim's big refactoring of the Geometry modules. Fixes #590. All tests pass in FF (except the PanZoomBar stuff, which wasn't touched by this patch) and IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2931 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -20,24 +20,7 @@ OpenLayers.Geometry.LineString.prototype =
|
||||
* @param {Array(OpenLayers.Geometry.Point)} points
|
||||
*/
|
||||
initialize: function(points) {
|
||||
OpenLayers.Geometry.Curve.prototype.initialize.apply(this,
|
||||
arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns An exact clone of this OpenLayers.Feature
|
||||
* @type OpenLayers.Feature
|
||||
*/
|
||||
clone: function (obj) {
|
||||
if (obj == null) {
|
||||
obj = new OpenLayers.Geometry.LineString();
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.components.length; i++) {
|
||||
obj.addComponent(this.components[i].clone());
|
||||
}
|
||||
|
||||
return obj;
|
||||
OpenLayers.Geometry.Curve.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
/** Only allows removal of a point if there are three or more points in
|
||||
@@ -47,7 +30,7 @@ OpenLayers.Geometry.LineString.prototype =
|
||||
*/
|
||||
removeComponent: function(point) {
|
||||
if ( this.components && (this.components.length > 2)) {
|
||||
OpenLayers.Geometry.Curve.prototype.removeComponent.apply(this,
|
||||
OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,
|
||||
arguments);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user