Switch from mousewheel to wheel, as Leaflet did
Otherwise, wheel will zoom the map even when sent on a panel or control.
This commit is contained in:
parent
891c23747f
commit
bbcf9d8b96
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue