-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Implement margins concept for map canvas #5252
Conversation
🎉 Ta-daaa, freshly created APKs are available for 07ddbca: arm64-android |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really loved labels and transparent background color.
color: "#ffffff" | ||
radius: 8 | ||
} | ||
color: "#bbfafafa" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohsenD98 , we have to hard code it for now because the elevation plotting canvas doesn't expose a property to set the label color yet (and therefore the result is bad on dark theme ATM)
This PR implements the concept of margins (bottom and right for now) to the map canvas. Those margins allow for us to overlay elements on top of the map canvas and take those margins into account when setting the map extent / center.
Practically speaking, this allows for zooming to feature / point to recenter around the portion of the map that's not covered by overlaid elements.
Needed for the ongoing revamp of information panel -> drawer (see #5251)
Here's a screencast of what it does:
vokoscreenNG-2024-05-20_11-55-05.mp4
Note how the auto re-centering to positioning and destination is contained within the part of the map canvas that's not partially hidden by the information drawer. Big win! This was not needed before as we were shrinking the map canvas to show information below it (booouh;) ).
Margin magic in action, this time with zooming into features:
vokoscreenNG-2024-05-20_13-56-04.mp4
You can see the feature nicely fits within the top-left region that's not obstructed by either the feature form nor the information drawers.