Skip to content

Commit 6ff829b

Browse files
committed
add @luomus/leaflet-smooth-wheel-zoom dependency and configure smooth scrolling in MapView
1 parent df31191 commit 6ff829b

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

pcd-website/package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pcd-website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@astrojs/vue": "^5.1.4",
13+
"@luomus/leaflet-smooth-wheel-zoom": "^1.0.0",
1314
"astro": "^5.17.1",
1415
"focus-trap": "^8.0.0",
1516
"leaflet": "^1.9.4",

pcd-website/src/components/MapView.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ function handleKeydown(e: KeyboardEvent) {
7272
onMounted(async () => {
7373
const L = (await import('leaflet')).default;
7474
await import('leaflet.markercluster');
75+
await import('@luomus/leaflet-smooth-wheel-zoom');
7576
7677
const map = L.map('map', {
7778
zoomControl: true,
79+
scrollWheelZoom: false,
80+
smoothWheelZoom: true,
81+
smoothSensitivity: 1,
7882
});
7983
mapInstance = map;
8084

0 commit comments

Comments
 (0)