adding irregular option to regular polygon control - now, go draw rectangles, and more - thanks for the review elem (closes #1098).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -160,10 +160,11 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, {
|
||||
* distance from the origin. A scale of 2 doubles the
|
||||
* distance between the point and origin.
|
||||
* origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing
|
||||
* ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1.
|
||||
*/
|
||||
resize: function(scale, origin) {
|
||||
this.x = origin.x + (scale * (this.x - origin.x));
|
||||
|
||||
resize: function(scale, origin, ratio) {
|
||||
ratio = (ratio == undefined) ? 1 : ratio;
|
||||
this.x = origin.x + (scale * ratio * (this.x - origin.x));
|
||||
this.y = origin.y + (scale * (this.y - origin.y));
|
||||
this.clearBounds();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user