Correctly set default anchor for collections
This commit is contained in:
@@ -249,9 +249,13 @@ ol.geom.GeometryCollection.prototype.rotate = function(angle, anchor) {
|
||||
* @api
|
||||
*/
|
||||
ol.geom.GeometryCollection.prototype.scale = function(sx, opt_sy, opt_anchor) {
|
||||
var anchor = opt_anchor;
|
||||
if (!anchor) {
|
||||
anchor = ol.extent.getCenter(this.getExtent());
|
||||
}
|
||||
var geometries = this.geometries_;
|
||||
for (var i = 0, ii = geometries.length; i < ii; ++i) {
|
||||
geometries[i].scale(sx, opt_sy, opt_anchor);
|
||||
geometries[i].scale(sx, opt_sy, anchor);
|
||||
}
|
||||
this.changed();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user