mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 11:32:38 +02:00
chore: remove unused DomEvent.once
This commit is contained in:
parent
7991d6cdbe
commit
07363fa5fe
1 changed files with 0 additions and 18 deletions
|
@ -192,24 +192,6 @@ L.DomUtil.contrastedColor = (el, bgcolor) => {
|
||||||
if (bgcolor) _CACHE_CONSTRAST[bgcolor] = out
|
if (bgcolor) _CACHE_CONSTRAST[bgcolor] = out
|
||||||
return 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 () {
|
L.LatLng.prototype.isValid = function () {
|
||||||
return (
|
return (
|
||||||
Number.isFinite(this.lat) &&
|
Number.isFinite(this.lat) &&
|
||||||
|
|
Loading…
Reference in a new issue