@nextgis/leaflet-map-adapter 2.2.2 → 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.
- package/lib/leaflet-map-adapter.esm-browser.js +13 -2
- package/lib/leaflet-map-adapter.esm-browser.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.js +13 -2
- package/lib/leaflet-map-adapter.esm-bundler.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.global.js +13 -2
- package/lib/leaflet-map-adapter.global.js.map +1 -1
- package/lib/leaflet-map-adapter.global.prod.js +1 -1
- package/lib/leaflet-map-adapter.global.prod.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/leaflet-map-adapter; version: 2.2.
|
|
1
|
+
/** Bundle of @nextgis/leaflet-map-adapter; version: 2.2.3; author: NextGIS */
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import { Control, DomEvent, GeoJSON, DivIcon, Marker, CircleMarker, FeatureGroup, ImageOverlay as ImageOverlay$1, Layer, Util, CRS, GridLayer, DomUtil, TileLayer as TileLayer$1, Map, latLngBounds, latLng } from 'leaflet';
|
|
4
4
|
import { defined, debounce as debounce$1 } from '@nextgis/utils';
|
|
@@ -295,12 +295,13 @@ class GeoJsonEvents {
|
|
|
295
295
|
constructor(layer) {
|
|
296
296
|
__publicField$6(this, "layer");
|
|
297
297
|
__publicField$6(this, "_onclick");
|
|
298
|
+
__publicField$6(this, "_ondblclick");
|
|
298
299
|
__publicField$6(this, "_mouseout");
|
|
299
300
|
__publicField$6(this, "_mouseover");
|
|
300
301
|
this.layer = layer;
|
|
301
302
|
}
|
|
302
303
|
handleMouseEvents(layer) {
|
|
303
|
-
const { onClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
|
|
304
|
+
const { onClick, onDoubleClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
|
|
304
305
|
const onClick_ = onClick || onLayerClick;
|
|
305
306
|
if (onClick_) {
|
|
306
307
|
this._onclick = (e) => {
|
|
@@ -311,6 +312,16 @@ class GeoJsonEvents {
|
|
|
311
312
|
};
|
|
312
313
|
layer.on("click", this._onclick, this);
|
|
313
314
|
}
|
|
315
|
+
if (onDoubleClick) {
|
|
316
|
+
this._ondblclick = (e) => {
|
|
317
|
+
DomEvent.stopPropagation(e);
|
|
318
|
+
const selected = !!this.layer._getSelected(layer);
|
|
319
|
+
onDoubleClick(__spreadValues$7({
|
|
320
|
+
selected
|
|
321
|
+
}, this._createMouseEvent(e)));
|
|
322
|
+
};
|
|
323
|
+
layer.on("dblclick", this._ondblclick, this);
|
|
324
|
+
}
|
|
314
325
|
if (onMouseOut) {
|
|
315
326
|
this._mouseout = (e) => {
|
|
316
327
|
onMouseOut(this._createMouseEvent(e));
|