disable map scroll wheel zoom
parent
afa0286a2a
commit
78cae2f964
|
|
@ -10,8 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const mapLatitude = Number.parseFloat(mapContainerElement.dataset.latitude ?? '');
|
const mapLatitude = Number.parseFloat(mapContainerElement.dataset.latitude ?? '');
|
||||||
const mapLongitude = Number.parseFloat(mapContainerElement.dataset.longitude ?? '');
|
const mapLongitude = Number.parseFloat(mapContainerElement.dataset.longitude ?? '');
|
||||||
const mapCoordinates = [mapLatitude, mapLongitude];
|
const mapCoordinates = [mapLatitude, mapLongitude];
|
||||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
|
||||||
const map = L.map(mapContainerElement);
|
const map = L.map(mapContainerElement, {
|
||||||
|
scrollWheelZoom: false
|
||||||
|
});
|
||||||
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom);
|
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom);
|
||||||
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
||||||
attribution: sunrise.leafletConstants.attribution,
|
attribution: sunrise.leafletConstants.attribution,
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,10 @@ declare const exports: {
|
||||||
|
|
||||||
const mapCoordinates: Leaflet.LatLngTuple = [mapLatitude, mapLongitude]
|
const mapCoordinates: Leaflet.LatLngTuple = [mapLatitude, mapLongitude]
|
||||||
|
|
||||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
|
||||||
const map: Leaflet.Map = L.map(mapContainerElement)
|
const map: Leaflet.Map = L.map(mapContainerElement, {
|
||||||
|
scrollWheelZoom: false
|
||||||
|
})
|
||||||
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom)
|
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom)
|
||||||
|
|
||||||
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const mapLatitude = Number.parseFloat(mapContainerElement.dataset.latitude ?? '');
|
const mapLatitude = Number.parseFloat(mapContainerElement.dataset.latitude ?? '');
|
||||||
const mapLongitude = Number.parseFloat(mapContainerElement.dataset.longitude ?? '');
|
const mapLongitude = Number.parseFloat(mapContainerElement.dataset.longitude ?? '');
|
||||||
const mapCoordinates = [mapLatitude, mapLongitude];
|
const mapCoordinates = [mapLatitude, mapLongitude];
|
||||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
|
||||||
const map = L.map(mapContainerElement);
|
const map = L.map(mapContainerElement, {
|
||||||
|
scrollWheelZoom: false
|
||||||
|
});
|
||||||
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom);
|
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom);
|
||||||
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
||||||
attribution: sunrise.leafletConstants.attribution,
|
attribution: sunrise.leafletConstants.attribution,
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,10 @@ declare const exports: {
|
||||||
|
|
||||||
const mapCoordinates: Leaflet.LatLngTuple = [mapLatitude, mapLongitude]
|
const mapCoordinates: Leaflet.LatLngTuple = [mapLatitude, mapLongitude]
|
||||||
|
|
||||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
|
||||||
const map: Leaflet.Map = L.map(mapContainerElement)
|
const map: Leaflet.Map = L.map(mapContainerElement, {
|
||||||
|
scrollWheelZoom: false
|
||||||
|
})
|
||||||
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom)
|
map.setView(mapCoordinates, sunrise.leafletConstants.defaultZoom)
|
||||||
|
|
||||||
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
L.tileLayer(sunrise.leafletConstants.tileLayerURL, {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue