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

Add dragInertia options for custom drag panning #8260

Closed
wants to merge 1 commit into from
Closed

Add dragInertia options for custom drag panning #8260

wants to merge 1 commit into from

Conversation

aMoniker
Copy link

This PR Adds dragInertia options to the base map options.

I don't know if this exposes too many options, and/or if there should be another option for setting velocity directly. I also don't know if I'm following convention as this is my first PR to the codebase. Happy to change what's needed.

I haven't written tests for this yet, but can once the idea & options format is considered acceptable. Likewise for public API documentation & benchmarks.

Fixes #4851

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

@arindam1993
Copy link
Contributor

Thanks for the PR @aMoniker 😃

I think it looks good for the most part, but I think a cleaner api would be to allow setting these properties on options.dragPan, the truthy-ness can be used to activate/deactivate the handler, and the data can be used to configure it.

@arindam1993
Copy link
Contributor

Closing since these changes have been integrated into #8887, thanks @aMoniker!

@aMoniker
Copy link
Author

Nice work, thanks @arindam1993

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.

Customize inertia values from drag pan
2 participants