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 pinch gesture tradeoff configuration option #890

Merged
merged 3 commits into from
Dec 2, 2021

Conversation

macdrevx
Copy link
Contributor

@macdrevx macdrevx commented Dec 2, 2021

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Document any changes to public APIs.
  • Update the changelog

Summary of changes

In #837, we fixed #775, but the solution introduced a new issue, #864. At the moment, we don't have a way to solve both issues simultaneously, so this PR introduces a configuration option to allow developers to make the tradeoff between the two issues that is best for their use case.

The new configuration option is marked as experimental because we hope to eliminate the need for developers to make this tradeoff in a future release. Note that experimental APIs may be modified or removed without a major version bump.

The default configuration is set to match the v10.1 behavior.

To use the new option, annotate your import statement with @_spi(Experimental) and then set mapView.gestures.options.pinchBehavior = .doesNotResetCameraAtEachFrame.

This option may be changed dynamically at any time and the change will take effect when the next pinch gesture begins.

Copy link
Member

@pengdev pengdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The experimental API looks good to me

@macdrevx macdrevx merged commit 55ebde1 into main Dec 2, 2021
@macdrevx macdrevx deleted the ah/pinch-gesture-tradeoff branch December 2, 2021 17:33
macdrevx added a commit that referenced this pull request Dec 2, 2021
* Fix StyleColor tests for iOS 12 and lower (#847)

* Make persistent layer APIs non-experimental (#849)

* Generate private module interface (#854)

* Fix changelog (#857)

* Fix to only localize the primary localization and not the fall-throug… (#856)

* Exclude swiftlint config from packaged artifact (#859)

* View Annotations follow-up (#846)

* Reduce geometry wrapping using GeometryConvertible (#861)

* Update baselines to new format (#863)

* Delay adding puck images until adding layer (#862)

* Add missing StyleColor support for exponentials (#873)

* Fix attribution dialog initialization (#865)

* Add v10.0.2 to CHANGELOG.md (#883)

* Improve panning behavior on pitched maps (#888)

* Add pinch gesture tradeoff configuration option (#890)

* Update MapboxCoreMaps and MapboxCommon (#891)

* Update changelog and bump version for v10.2.0-rc.1 (#892)
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.

Camera state update on camera changing issue
3 participants