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:
@@ -183,14 +183,20 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {
|
||||
*
|
||||
* Parameters:
|
||||
* components - {Array(<OpenLayers.Geometry>)} The components to be removed
|
||||
*
|
||||
* Returns:
|
||||
* {Boolean} A component was removed.
|
||||
*/
|
||||
removeComponents: function(components) {
|
||||
var removed = false;
|
||||
|
||||
if(!(OpenLayers.Util.isArray(components))) {
|
||||
components = [components];
|
||||
}
|
||||
for(var i=components.length-1; i>=0; --i) {
|
||||
this.removeComponent(components[i]);
|
||||
removed = this.removeComponent(components[i]) || removed;
|
||||
}
|
||||
return removed;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -199,6 +205,9 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {
|
||||
*
|
||||
* Parameters:
|
||||
* component - {<OpenLayers.Geometry>}
|
||||
*
|
||||
* Returns:
|
||||
* {Boolean} The component was removed.
|
||||
*/
|
||||
removeComponent: function(component) {
|
||||
|
||||
@@ -207,6 +216,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {
|
||||
// clearBounds() so that it gets recalculated on the next call
|
||||
// to this.getBounds();
|
||||
this.clearBounds();
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user