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

Refactor CameraAnimatorInterface #1181

Merged
merged 2 commits into from
Mar 9, 2022
Merged

Conversation

macdrevx
Copy link
Contributor

@macdrevx macdrevx commented Mar 9, 2022

This refactoring is part one of a series that will unlock better unit testability for CameraAnimationsManager.

  • The animation owner for ease-to, fly-to, and gesture-deceleration animations is now "com.mapbox.maps.cameraAnimationsManager".
  • BasicCameraAnimator.owner property is now public.
  • Animator delegates are now always internal and set after initialization.
  • Animators now have a standard completion block signature and standard interface for adding completion blocks.
  • CameraAnimatorInterface has been renamed to CameraAnimatorProtocol.
  • CameraAnimatorDelegate is now written in terms of CameraAnimatorProtocol instead of in terms of CameraAnimator.

Pull request checklist:

  • Write tests for all new functionality. If tests were not written, please explain why.
  • Describe the changes in this PR, especially public API changes.
  • Add a changelog entry to to bottom of the relevant section (typically the ## main heading near the top).
  • Review and agree to the Contributor License Agreement (CLA).

@macdrevx macdrevx requested review from evil159 and OdNairy March 9, 2022 03:14
@macdrevx macdrevx force-pushed the refactor-camera-animator-interface branch 2 times, most recently from c6b89b7 to 4e02508 Compare March 9, 2022 03:19
* The animation owner for ease-to, fly-to, and gesture-deceleration
  animations is now `"com.mapbox.maps.cameraAnimationsManager"`.

* `BasicCameraAnimator.owner` property is now public.

* Animator delegates are now always internal and set after
  initialization.

* Animators now have a standard completion block signature and standard
  interface for adding completion blocks.

* `CameraAnimatorInterface` has been renamed to
  `CameraAnimatorProtocol`.

* `CameraAnimatorDelegate` is now written in terms of
  `CameraAnimatorProtocol` instead of in terms of `CameraAnimator`.
@macdrevx macdrevx force-pushed the refactor-camera-animator-interface branch from 4e02508 to 6a2e093 Compare March 9, 2022 03:25
@macdrevx macdrevx enabled auto-merge (squash) March 9, 2022 13:33
@macdrevx macdrevx merged commit 1e63adb into main Mar 9, 2022
@macdrevx macdrevx deleted the refactor-camera-animator-interface branch March 9, 2022 13:42
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.

2 participants