mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: make that renderUI also recompute scrollWheelZoom
Otherwise it does not change the behaviour when changing the setting.
This commit is contained in:
parent
b7649a5e47
commit
97ff26b6e8
1 changed files with 6 additions and 6 deletions
|
@ -96,12 +96,6 @@ const ControlsMixin = {
|
|||
this._controls.more = new U.MoreControls()
|
||||
this._controls.scale = L.control.scale()
|
||||
this._controls.permanentCredit = new U.PermanentCreditsControl(this)
|
||||
if (this.options.scrollWheelZoom){
|
||||
this.scrollWheelZoom.enable()
|
||||
} else {
|
||||
this.scrollWheelZoom.disable()
|
||||
this.options.dragging = !L.Browser.mobile
|
||||
}
|
||||
this._umap.drop = new U.DropControl(this)
|
||||
this._controls.tilelayers = new U.TileLayerControl(this)
|
||||
},
|
||||
|
@ -289,6 +283,12 @@ export const LeafletMap = BaseMap.extend({
|
|||
|
||||
renderUI: function () {
|
||||
setOptions(this, this._umap.properties)
|
||||
if (this.options.scrollWheelZoom) {
|
||||
this.scrollWheelZoom.enable()
|
||||
} else {
|
||||
this.scrollWheelZoom.disable()
|
||||
this.options.dragging = !L.Browser.mobile
|
||||
}
|
||||
// Needs tilelayer to exist for minimap
|
||||
this.renderControls()
|
||||
this.handleLimitBounds()
|
||||
|
|
Loading…
Reference in a new issue