Skip to content
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

Is cooperativeGestures parameter supported? #79

Open
beazergood opened this issue Jan 4, 2023 · 1 comment
Open

Is cooperativeGestures parameter supported? #79

beazergood opened this issue Jan 4, 2023 · 1 comment

Comments

@beazergood
Copy link

beazergood commented Jan 4, 2023

I'd like to use this option for better UX on mobile.

So far I've tried adding it to the Map component as a prop, to the mapComponent object, and as an option, but having no luck.

<Map
  accessToken={PUBLIC_MAPBOX_API_TOKEN}
  style="mapbox://styles/mapbox/outdoors-v11"
  bind:this={mapComponent}
  on:ready={onReady}
  center={[event.location.lng, event.location.lat]}
  zoom="4"
  cooperativeGestures={true}
// or
  options={{ cooperativeGestures: true }}
>

or mapComponent.cooperativeGesture = true;
or mapComponent.options = {cooperativeGesture = true};

Thought I'd check if it's supported or something I'm doing wrong. (most likely the latter, i'm a Svelte noob!)

@pafech
Copy link

pafech commented Jan 25, 2023

It does work with: <Map cooperativeGestures: true>
...but only for mobile.
It appears that the Desktop version stopped working at some point, unfortunately I'm unable to say at which point.

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

No branches or pull requests

2 participants