openlayers / openlayers/openlayers

View glitches when conflicting constraint are set

Open
#10,508 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 17h
Merged PRs (30d)
21

Description

Describe the bug
When an extent and minResolution are set and they can't both be satisfied the View misbehaves.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/laughing-keldysh-x241y
  2. Zoom / pan in the maps.
  3. The view jumps / locks to different resolutions.

Expected behavior
If one of the constraints can't be satisfied prioritize one constraint.

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 by reproducing the behavior in the linked CodeSandbox while changing the View's extent and minResolution constraints, then trace the View constraint handling that controls zoom and pan. Done means conflicting constraints no longer cause jumps or locks and one constraint is consistently prioritized.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
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.