visgl / visgl/deck.gl

[Bug] Zoom level not monotonic on mouse wheel (?) event (i.e., mac touchpad)

Open
#8,989 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

Hello again! When I log the zoom level from a mouse wheel event (sorry if the name is wrong, I am using a mac touchpad on my laptop), the zoom level is not monotonic. I have a suspicion that this is throwing off some layers I have that rely on the zoom level for rendering.

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

I would expect the zoom level to be monotonic increasing/decreasing, but instead get:
Screenshot 2024-06-28 at 14 57 44

Steps to Reproduce

In my case I altered the DeckGL component in examples/website/orthographic to have onViewStateChange={({viewState}) => console.log(viewState.zoom)} and saw the above screenshot. The interleaving effect of zoom levels was apparent.

Environment
  • Framework version: main branch at time of writing (but also dating back somewhat far - the effect seems to be playing out on avivator.gehlenborglab.org on FF with the scale bar or with side-by-side on chrome where they move out of sync).
  • Browser: FF 127.0.2 or Chrome 125.0.6422.176
  • OS: MacOS 13.6.1 (22G313)
Logs

-0.9221760184089745 app.tsx:198:50
-0.668107634660729 app.tsx:198:50
-0.9221760184089745 app.tsx:198:50
-1.1586145932543173 app.tsx:198:50
-0.9221760184089745 app.tsx:198:50
-1.1586145932543173 app.tsx:198:50
-1.3831254525200256 app.tsx:198:50
-1.1586145932543173 app.tsx:198:50
-1.3831254525200256 app.tsx:198:50
-1.5955684191940207 app.tsx:198:50
-1.3831254525200256 app.tsx:198:50
-1.5955684191940207 app.tsx:198:50
-1.7958028571084879 app.tsx:198:50
-1.5955684191940207 app.tsx:198:50
-1.7958028571084879 app.tsx:198:50
-1.9836876969406194 app.tsx:198:50
-1.7958028571084879 app.tsx:198:50
-1.9836876969406194 app.tsx:198:50
-2 app.tsx:198:50
-1.9836876969406194 app.tsx:198:50
-2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DeckGL change in examples/website/orthographic that logs viewState.zoom through onViewStateChange, then reproduce the interleaved values using a Mac touchpad in the stated browsers. Trace how wheel-event updates reach the React view state and define completion as consistent zoom progression with the reported example behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.