mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix: Avoid map-panning on mobile using two fingers navigation (#2340)
If scrollWheelZoom option is false we deactivate leaflet dragging options only on mobile
This commit is contained in:
commit
b7649a5e47
1 changed files with 6 additions and 2 deletions
|
@ -96,8 +96,12 @@ const ControlsMixin = {
|
||||||
this._controls.more = new U.MoreControls()
|
this._controls.more = new U.MoreControls()
|
||||||
this._controls.scale = L.control.scale()
|
this._controls.scale = L.control.scale()
|
||||||
this._controls.permanentCredit = new U.PermanentCreditsControl(this)
|
this._controls.permanentCredit = new U.PermanentCreditsControl(this)
|
||||||
if (this.options.scrollWheelZoom) this.scrollWheelZoom.enable()
|
if (this.options.scrollWheelZoom){
|
||||||
else this.scrollWheelZoom.disable()
|
this.scrollWheelZoom.enable()
|
||||||
|
} else {
|
||||||
|
this.scrollWheelZoom.disable()
|
||||||
|
this.options.dragging = !L.Browser.mobile
|
||||||
|
}
|
||||||
this._umap.drop = new U.DropControl(this)
|
this._umap.drop = new U.DropControl(this)
|
||||||
this._controls.tilelayers = new U.TileLayerControl(this)
|
this._controls.tilelayers = new U.TileLayerControl(this)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue