Adding original properties to cloned geometry
This commit is contained in:
@@ -118,11 +118,13 @@ class Polygon extends SimpleGeometry {
|
||||
* @api
|
||||
*/
|
||||
clone() {
|
||||
return new Polygon(
|
||||
const polygon = new Polygon(
|
||||
this.flatCoordinates.slice(),
|
||||
this.layout,
|
||||
this.ends_.slice()
|
||||
);
|
||||
polygon.importPropertiesFrom(this);
|
||||
return polygon;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user