@nextgis/leaflet-map-adapter 2.2.1 → 2.2.3

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/leaflet-map-adapter; version: 2.2.1; author: NextGIS */
1
+ /** Bundle of @nextgis/leaflet-map-adapter; version: 2.2.3; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -14851,12 +14851,13 @@ class GeoJsonEvents {
14851
14851
  constructor(layer) {
14852
14852
  __publicField$7(this, "layer");
14853
14853
  __publicField$7(this, "_onclick");
14854
+ __publicField$7(this, "_ondblclick");
14854
14855
  __publicField$7(this, "_mouseout");
14855
14856
  __publicField$7(this, "_mouseover");
14856
14857
  this.layer = layer;
14857
14858
  }
14858
14859
  handleMouseEvents(layer) {
14859
- const { onClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
14860
+ const { onClick, onDoubleClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
14860
14861
  const onClick_ = onClick || onLayerClick;
14861
14862
  if (onClick_) {
14862
14863
  this._onclick = (e) => {
@@ -14867,6 +14868,16 @@ class GeoJsonEvents {
14867
14868
  };
14868
14869
  layer.on("click", this._onclick, this);
14869
14870
  }
14871
+ if (onDoubleClick) {
14872
+ this._ondblclick = (e) => {
14873
+ leafletSrcExports.DomEvent.stopPropagation(e);
14874
+ const selected = !!this.layer._getSelected(layer);
14875
+ onDoubleClick(__spreadValues$7({
14876
+ selected
14877
+ }, this._createMouseEvent(e)));
14878
+ };
14879
+ layer.on("dblclick", this._ondblclick, this);
14880
+ }
14870
14881
  if (onMouseOut) {
14871
14882
  this._mouseout = (e) => {
14872
14883
  onMouseOut(this._createMouseEvent(e));
@@ -15797,9 +15808,10 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
15797
15808
  super._initImage();
15798
15809
  const headers = this.options.headers;
15799
15810
  const img = this._image;
15811
+ const src = img.src;
15800
15812
  img.src = "";
15801
15813
  imageQueue$1.add(() => {
15802
- const [promise, abortFunc] = callAjax(img.src, headers);
15814
+ const [promise, abortFunc] = callAjax(src, headers);
15803
15815
  promise.then((imgUrl) => {
15804
15816
  img.src = imgUrl;
15805
15817
  });