nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 2b41be8536bb234c1f8a8848654d7657093d10e7
parent c4b7dae8324e38681fead2314106ff1a3a73828f
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Wed, 25 Jan 2017 11:27:07 +0300

Disable map zoom when scrolling layers config dialogs

Diffstat:
Msrc/lib/leaflet.control.layers.configure/index.js | 17++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/lib/leaflet.control.layers.configure/index.js b/src/lib/leaflet.control.layers.configure/index.js @@ -77,10 +77,9 @@ function enableConfig(control, layers) { const container = this._configWindow = L.DomUtil.create('div', 'leaflet-layers-dialog-wrapper'); - L.DomEvent.disableClickPropagation(container); - if (!L.Browser.touch) { - L.DomEvent.disableScrollPropagation(container); - } + L.DomEvent + .disableClickPropagation(container) + .disableScrollPropagation(container); container.innerHTML = ` <div class="leaflet-layers-select-window"> <form> @@ -230,13 +229,9 @@ function enableConfig(control, layers) { this._customLayerWindow = L.DomUtil.create('div', 'leaflet-layers-dialog-wrapper', this._map._controlContainer); - if (!L.Browser.touch) { - L.DomEvent - .disableClickPropagation(this._customLayerWindow) - .disableScrollPropagation(this._customLayerWindow); - } else { - L.DomEvent.on(this._customLayerWindow, 'click', L.DomEvent.stopPropagation); - } + L.DomEvent + .disableClickPropagation(this._customLayerWindow) + .disableScrollPropagation(this._customLayerWindow); let customLayerWindow = L.DomUtil.create('div', 'custom-layers-window', this._customLayerWindow); let form = L.DomUtil.create('form', '', customLayerWindow);