Merge pull request #1211 from umap-project/mousewheel-to-wheel

Switch from mousewheel to wheel, as Leaflet did
This commit is contained in:
Yohan Boniface 2023-07-17 15:06:18 +02:00 committed by GitHub
commit d26db7f0bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -472,7 +472,7 @@ L.U.DataLayersControl = L.Control.extend({
if (L.Browser.pointer) {
L.DomEvent.disableClickPropagation(container)
L.DomEvent.on(container, 'mousewheel', L.DomEvent.stopPropagation)
L.DomEvent.on(container, 'wheel', L.DomEvent.stopPropagation)
L.DomEvent.on(container, 'MozMousePixelScroll', L.DomEvent.stopPropagation)
}
if (!L.Browser.touch) {

View file

@ -11,7 +11,7 @@ L.U.UI = L.Evented.extend({
this.container = L.DomUtil.create('div', 'leaflet-ui-container', this.parent)
L.DomEvent.disableClickPropagation(this.container)
L.DomEvent.on(this.container, 'contextmenu', L.DomEvent.stopPropagation) // Do not activate our custom context menu.
L.DomEvent.on(this.container, 'mousewheel', L.DomEvent.stopPropagation)
L.DomEvent.on(this.container, 'wheel', L.DomEvent.stopPropagation)
L.DomEvent.on(this.container, 'MozMousePixelScroll', L.DomEvent.stopPropagation)
this._panel = L.DomUtil.create('div', '', this.container)
this._panel.id = 'umap-ui-container'