openstreetmap-polska / openaedmap-frontend

Map which shows locations of defibrillators (AEDs) and allows adding new ones.
https://OpenAEDMap.org
MIT License
29 stars 18 forks source link

Navigating with a high resolution wheel scrolling is buggy #147

Open Zaczero opened 1 year ago

Zaczero commented 1 year ago

On this video, all I do is one mouse rotation up and down. I never lift my finer off the scroll wheel. It's way too sensitive. Maybe https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaY is not handled properly?

https://github.com/openstreetmap-polska/openaedmap-frontend/assets/10835147/57c3da37-4f0e-437d-bb0e-73c2184b2b65

starsep commented 1 year ago

Zoom is set to integer on purpose at https://github.com/openstreetmap-polska/openaedmap-frontend/blob/3be34a4ee8714a3d6e70d6457f75f11358330180/src/components/map.tsx#L201

I commented out this line and seems to work fine. I don't see any issue with e.g. vector tiles. They are fetched with rounded zoom level @ttomasz Why only integers? Definitely url looks better but it could be rounded while serializing.

ttomasz commented 1 year ago

@ttomasz Why only integers? Definitely url looks better but it could be rounded while serializing.

I don't remember it used to be some fraction very long time ago but someone said or changed it because they felt it was too slow or something.

Zaczero commented 1 year ago

This is still open, I noticed the behavior switches seemingly at random. I caught it on video:

https://github.com/openstreetmap-polska/openaedmap-frontend/assets/10835147/c088ca36-db23-45f5-88f0-0439554447dd