-
-
Notifications
You must be signed in to change notification settings - Fork 705
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 transformCameraUpdate callback #2535
Add transformCameraUpdate callback #2535
Conversation
To see how this PR worked in practice, I made a debug page here (it can be dumped next to the other, if this PR branch is checked out): I think it works as expected, with minimal change to our public API, and if I'm not mistaken it doesn't see to contain any breaking changes. Here is a small clip of the left map driving the right, without constantly lagging a frame behind. Screen.Recording.2023-05-16.at.12.40.03.mov |
This little hook has surprisingly great utility - should not be overlooked.
|
@Pessimistress thanks for taking the time to open this PR! |
Some renames according to review comments:
I don't think How concerned are you about the bundle size? |
Not really concerned. Please update the size in the test. |
Thanks for the renaming, i find this easier to reason about. We need a changelog entry. |
Great job! |
For #1545
Change List
transformCameraUpdate
option toMap
_startCameraUpdate
and_endCameraUpdate
into the following methods whereCamera.transform
is modified:Camera.jumpTo
Camera.easeTo
Camera.flyTo
HandlerManager._updateMapTransform
See inline comments
HandlerBase
for handlers to access the correct camera stateThere should be no behavioral change or performance overhead if
transformCameraUpdate
is not assigned.Launch Checklist
CHANGELOG.md
under the## main
section.