@artstesh/maps 1.1.28 → 1.1.30

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.
@@ -911,7 +911,7 @@
911
911
  * Constructs an instance of the class.
912
912
  *
913
913
  * @param {PolygonModel} model - The model representing the polygon data.
914
- * @param {Style} style - The style to be applied to the polygon.
914
+ * @param {StyleLike} style - The style to be applied to the polygon.
915
915
  * @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the feature, defaults to GeoJson.
916
916
  * @param {boolean} [draggable=true] - Determines whether the polygon is draggable, defaults to true.
917
917
  */
@@ -1833,7 +1833,7 @@
1833
1833
  var model = new MapClickEvent(ev.coordinate, {}, {});
1834
1834
  (_a = this.map) === null || _a === void 0 ? void 0 : _a.forEachFeatureAtPixel(ev.pixel, function (f, l) {
1835
1835
  _this.getFeatureCollectionWithInner([f])
1836
- .filter(function (f) { return f.getId() != null; })
1836
+ .filter(function (f) { return f.getId() != null && !!l; })
1837
1837
  .forEach(function (fs) {
1838
1838
  var layerName = l.get('name');
1839
1839
  if (!model.entities[layerName])
@@ -2041,11 +2041,12 @@
2041
2041
  });
2042
2042
  };
2043
2043
  FeatureModificationService.prototype.clearInteraction = function (layer) {
2044
- var _a, _b;
2044
+ var _a, _b, _c;
2045
+ (_a = layer === null || layer === void 0 ? void 0 : layer.getSource()) === null || _a === void 0 ? void 0 : _a.clear();
2045
2046
  if (this.modify)
2046
- (_a = this.map) === null || _a === void 0 ? void 0 : _a.removeInteraction(this.modify);
2047
+ (_b = this.map) === null || _b === void 0 ? void 0 : _b.removeInteraction(this.modify);
2047
2048
  if (this.translate)
2048
- (_b = this.map) === null || _b === void 0 ? void 0 : _b.removeInteraction(this.translate);
2049
+ (_c = this.map) === null || _c === void 0 ? void 0 : _c.removeInteraction(this.translate);
2049
2050
  };
2050
2051
  return FeatureModificationService;
2051
2052
  }());