@artstesh/maps 4.1.3 → 4.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm2020/map/models/polygon.model.mjs +4 -1
- package/dist/esm2020/src/map/models/polygon.model.mjs +4 -1
- package/dist/fesm2015/maps-components-src-map.mjs +4 -2
- package/dist/fesm2015/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2015/maps-components.mjs +4 -2
- package/dist/fesm2015/maps-components.mjs.map +1 -1
- package/dist/fesm2020/maps-components-src-map.mjs +2 -0
- package/dist/fesm2020/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2020/maps-components.mjs +2 -0
- package/dist/fesm2020/maps-components.mjs.map +1 -1
- package/dist/package.json +2 -1
- package/package.json +2 -2
|
@@ -166,11 +166,13 @@ class PolygonModel {
|
|
|
166
166
|
return new PolygonModel(feature, id, info);
|
|
167
167
|
}
|
|
168
168
|
constructor(feature, id, info) {
|
|
169
|
-
var _a;
|
|
169
|
+
var _a, _b;
|
|
170
170
|
this.info = info;
|
|
171
171
|
this.id = id == null ? IdGenerator.get() : id;
|
|
172
172
|
this._feature = feature;
|
|
173
|
-
|
|
173
|
+
if (this.info)
|
|
174
|
+
(_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
|
|
175
|
+
[this.lng, this.lat] = getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent());
|
|
174
176
|
}
|
|
175
177
|
get feature() {
|
|
176
178
|
return this._feature;
|