Skip to content

Conversation

@manuel-em
Copy link
Contributor

@manuel-em manuel-em commented Oct 20, 2025

On a flyTo call with a padding option, if the user has activated the browser prefers-reduced-motion, a jumpTo is call with some options picks to build a CameraOptions and the padding is lost. This change picks padding too and build a JumpToOptions instead.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.

@manuel-em manuel-em changed the title On a flyTo call with prefers-reduced-motion set, apply the padding option draft: On a flyTo call with prefers-reduced-motion set, apply the padding option Oct 20, 2025
…s-reduced-motion is set and flyTo calls a jumpTo instead
@manuel-em manuel-em force-pushed the 6576-prefersReducedMotion-padding branch from 7b66867 to a356d67 Compare October 20, 2025 09:32
@manuel-em manuel-em changed the title draft: On a flyTo call with prefers-reduced-motion set, apply the padding option On a flyTo call with prefers-reduced-motion set, apply the padding option Oct 20, 2025
@HarelM
Copy link
Collaborator

HarelM commented Oct 21, 2025

This looks great! Thanks! Can you add a chancelog entry?

@manuel-em manuel-em force-pushed the 6576-prefersReducedMotion-padding branch from 4ed5919 to f6e3eb2 Compare October 21, 2025 08:07
@manuel-em
Copy link
Contributor Author

Changelog entry added. Thanks for the review.

@HarelM HarelM enabled auto-merge (squash) October 26, 2025 07:36
@HarelM HarelM merged commit cdb26fe into maplibre:main Oct 26, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In a flyTo call with browser.prefersReducedMotion=true, the padding option is lost

2 participants