From 07363fa5fe2ac18cada975ae0582ce82e6e9d639 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 23 Apr 2025 16:52:55 +0200 Subject: [PATCH] chore: remove unused DomEvent.once --- umap/static/umap/js/umap.core.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index 695c6d85..5d653d37 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -192,24 +192,6 @@ L.DomUtil.contrastedColor = (el, bgcolor) => { if (bgcolor) _CACHE_CONSTRAST[bgcolor] = out return out } -L.DomEvent.once = (el, types, fn, context) => { - // cf https://github.com/Leaflet/Leaflet/pull/3528#issuecomment-134551575 - - if (typeof types === 'object') { - for (const type in types) { - L.DomEvent.once(el, type, types[type], fn) - } - return L.DomEvent - } - - const handler = L.bind(() => { - L.DomEvent.off(el, types, fn, context).off(el, types, handler, context) - }, L.DomEvent) - - // add a listener that's executed once and removed after that - return L.DomEvent.on(el, types, fn, context).on(el, types, handler, context) -} - L.LatLng.prototype.isValid = function () { return ( Number.isFinite(this.lat) &&