mapbox / mapbox/mapbox-gl-js

TouchZoomRotate handler should not fire additional event on inertial zoom

Open
#9,034 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

A touch zoom can trigger two separate zoom events: one for while the fingers are down and one for the inertia zoom afterwards. Previously this wasn't showing up in the test because the map's minzoom was preventing the inertia zoom. The updated tests reflect the existing, actual behavior.

https://github.com/mapbox/mapbox-gl-js/blob/4e12ca76c45ef3923456f6245fb4565674fdf44f/src/ui/handler/touch_zoom_rotate.js#L237
https://github.com/mapbox/mapbox-gl-js/blob/4e12ca76c45ef3923456f6245fb4565674fdf44f/src/ui/handler/touch_zoom_rotate.js#L280

_Originally posted by @ansis in https://github.com/mapbox/mapbox-gl-js/pull/9028/files_

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 src/ui/handler/touch_zoom_rotate.js at the linked lines and inspect the updated touch-zoom tests mentioned in the issue. Reproduce the inertial zoom path and verify that a touch zoom does not emit an additional event after the fingers are lifted; the tests should capture the intended event count.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.