-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A more granular control over handling of prefers-reduced-motion #8743
Comments
You should also include an option to disable Upgrading to the latest version, map panning feels broken in chrome with Personally, I have "Reduce motion" enabled in my OSX settings because I don't like the OS window transitions. That this would affect the way I can pan an embedded map on a website is unexpected and undesired. |
@aMoniker the panning thing seems like a separate issue — I think we should disable panning inertia when disabling animation. cc @arindam1993 |
@mourner That sounds like it might be the solution. For now I've written an ugly hack to override the output of |
@aMoniker are you willing to share a snippet of your ugly hack? I'm struggling with this issue in a project. I am using the mapbox gl js in a project and I would like to ignore the
|
@dnspnjrs It's in typescript, but should work fine in plain javascript if you remove the types:
Then call |
Proposal to change the API to support an essential AnimationOption at #8883, we could then update the example at https://docs.mapbox.com/mapbox-gl-js/example/flyto-options/ to include this essential option, since to demonstrate "slowly fly to a location" it's essential that the animation occurs, to address https://github.com/mapbox/mapbox-gl-js-docs/issues/117. |
Motivation
There's quite a bit of confusion over GL JS handling of
prefers-reduced-motion
OS option (see #8288 and #8494 for background). Examples: #8716, #8648Design
From #8494 (comment) by @andrewharvey:
We could add
{essential: true}
to animation options (false
by default) that makes it animate regardless ofprefers-reduced-motion
. That would allow developers to fully control the experience, marking animations as essential where necessary. cc @arindam1993The text was updated successfully, but these errors were encountered: