#807 - give geometries a resize method - examples and tests for demonstration
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -260,6 +260,24 @@ OpenLayers.Geometry.Collection.prototype =
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: resize
|
||||
* Resize a geometry relative to some origin. Use this method to apply
|
||||
* a uniform scaling to a geometry.
|
||||
*
|
||||
* Parameters:
|
||||
* scale - {Float} Factor by which to scale the geometry. A scale of 2
|
||||
* doubles the size of the geometry in each dimension
|
||||
* (lines, for example, will be twice as long, and polygons
|
||||
* will have four times the area).
|
||||
* origin - {OpenLayers.Geometry.Point} Point of origin for resizing
|
||||
*/
|
||||
resize: function(scale, origin) {
|
||||
for(var i=0; i<this.components.length; ++i) {
|
||||
this.components[i].resize(scale, origin);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: equals
|
||||
* Tests for equivalent geometries
|
||||
|
||||
Reference in New Issue
Block a user