Creating an object that stores properties only when needed in BaseObject class

This commit is contained in:
Michał Zielański
2020-06-15 13:00:26 +02:00
parent 323a472fbb
commit 0e8f0034ab
7 changed files with 103 additions and 58 deletions
+3 -1
View File
@@ -128,7 +128,9 @@ class Feature extends BaseObject {
* @api
*/
clone() {
const clone = new Feature(this.getProperties());
const clone = new Feature(
this.hasProperties() ? this.getProperties() : undefined
);
clone.setGeometryName(this.getGeometryName());
const geometry = this.getGeometry();
if (geometry) {