Fix zoom in draw area task - #3913
Merged
Merged
Conversation
…w to update camera
…wPort runs only once
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3913 +/- ##
============================================
+ Coverage 69.36% 69.47% +0.10%
- Complexity 1963 1966 +3
============================================
Files 412 412
Lines 11015 11018 +3
Branches 1453 1453
============================================
+ Hits 7641 7655 +14
+ Misses 2624 2612 -12
- Partials 750 751 +1
🚀 New features to boost your workflow:
|
shobhitagarwal1612
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3833
When entering a draw area task, the map would jump to the max zoom instead of keeping the current zoom value of the home screen. This would happen because, since in the beginning there is only one draft vertex, there were no bounds to zoom to, so it would jump to the max zoom.
getDefaultViewPort()was added to the DrawAreaTaskViewModel to decide the camera position, and if there is only 1 point, it will only center on it. ThesetDefaultViewPortcall site was also modified so that it will only be triggered once after the STARTED state, instead of every time it entered that state as it was previouslyBefore
Screen_recording_20260831_174746.webm
After
Screen_recording_20260831_173314.webm
@shobhitagarwal1612 PTAL?