mapbox / mapbox/mapbox-gl-js

Canvas content shift after transform and size changed

Open
#13,113 2 comments 1 reaction 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

Environment

  • mapbox-gl-js version: 2.14.1 and 3.2.0
  • Browser: Google Chrome 121.0.6167.160
  • System: Ubuntu 23.04

Description

Canvas not longer display correctly, when changing size and transform scale to big size (8000px in this case), but DOM based items (Marker) still work fine.

Link to Demonstration

Expected Behavior

image

Actual Behavior

image

Extra information

Looks bug only happen on Blink, those browser work fine:

  • Mozilla Firefox 123.0.1
  • Epiphany 44.1

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 linked minimal reproduction and its source repository, then compare the resized and transformed canvas in Chrome with Firefox and Epiphany. The fix is complete when canvas content remains correctly positioned at the reported 8000px size and transform scale in Blink, while DOM markers continue to align.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.