Methods for programmatically manipulating sketches while digitizing features. r=bartvde (closes #3343)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12103 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -91,10 +91,13 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class(
|
||||
*
|
||||
* Parameters:
|
||||
* point - {<OpenLayers.Geometry.Point>}
|
||||
*
|
||||
* Returns:
|
||||
* {Boolean} The component was removed.
|
||||
*/
|
||||
removeComponent: function(point) {
|
||||
if (this.components.length > 3) {
|
||||
|
||||
var removed = this.components && (this.components.length > 3);
|
||||
if (removed) {
|
||||
//remove last point
|
||||
this.components.pop();
|
||||
|
||||
@@ -106,6 +109,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class(
|
||||
OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,
|
||||
[firstPoint]);
|
||||
}
|
||||
return removed;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user