Fix negative values overflowing vertically in the Relative Altitude Indicator#2494
Draft
rafaellehmkuhl wants to merge 2 commits into
Draft
Conversation
|
|
||
| const altitude = ref(0) | ||
| watch(store.altitude, () => (altitude.value = store.altitude.rel)) | ||
| watch(store.altitude, () => (altitude.value = Math.max(0, store.altitude.rel))) |
Contributor
There was a problem hiding this comment.
If you take off on a mountain or cliff, and you fly down from where you start, relative altitude can (and should) be negative
Member
Author
There was a problem hiding this comment.
Yeah, that definitely makes sense. Will adjust.
…ping Increase container widths and add whitespace-nowrap to prevent the value and unit from wrapping onto separate lines with negative numbers.
Negative relative altitude values are not meaningful for display, so clamp to zero to avoid showing confusing negative readings.
fd08945 to
6bc9afb
Compare
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.
Fix #2419