openlayers / openlayers/openlayers
Scroll support for WheelEvent.DOM_DELTA_PAGE
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12.6k
- Forks
- 3.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 21
Description
Is your feature request related to a problem? Please describe.
When the scroll is set to "One screen at a time" on Windows .
From personal observations (zooming in):
- On Chrome/Edge
{ deltaMode: 2, deltaY: -0.8 } - On Firefox
{ deltaMode: 2, deltaY: -1 }
so currently, you zoom miniscule amount.
There are other findings, though some a bit outdated:
- https://github.com/w3c/pointerevents/issues/592#issuecomment-392648065 - Chrome and Edge behave the same on Windows.
- https://github.com/w3c/pointerevents/issues/592#issuecomment-2228196131 - attached google docs.
Normalization examples:
Describe the solution you'd like
It is not very clear how much a page scroll should be in zooming context. Suggestions:
- scaling delta like
WheelEvent.DOM_DELTA_LINEwith a presumptiveconst PAGE_SIZE = 8 * LINE_SIZE delta = Math.sign(delta) * this.deltaPerZoom_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the map zoom handling for WheelEvent.DOM_DELTA_LINE and compare it with the reported Chrome, Edge, and Firefox DOM_DELTA_PAGE values. Review the linked normalization examples and determine a consistent page-size or zoom-step policy; done means page-mode wheel events produce an appropriate, tested zoom amount.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100