mapbox / mapbox/mapbox-gl-draw

When plugin enable there is a significant delay when initiating zoom with 2 finger pinch on mobile devices

Open
#962 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

**mapbox-gl-js version**: latest
**mapbox-gl-draw version**: latest

### Steps to Trigger Behavior

1. open a mobile browser and go here: https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
2. zoom using 2 fingers pinching outwards
3. notice a delay on the initial action of zooming

if you hold your 2 fingers there for a short period it works when you move them but if you touch the screen with 2 fingers and immediately attempt to zoom using this method there is a delay. This delay does not seem to exist on desktop computers when doing the same gesture on a trackpad

### Expected Behavior
Smooth delay-free zoom

### Actual Behavior
Zoom delayed at initial 2 finger touch with immediate zoom

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

Reproduce the delay on a mobile browser using the Mapbox GL Draw example at https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/, comparing the gesture with the plugin disabled if possible. Start by tracing the plugin's mobile touch handling and how the initial two-finger pinch is passed to mapbox-gl-js. Done means immediate, smooth pinch zoom on first touch without breaking drawing gestures.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.