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

Gauge - Revert to using only width to calculate value font-size #1390

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions ui/src/widgets/ui-gauge/types/UIGaugeDial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -394,18 +394,14 @@ export default {
},
resizeText () {
const clientWidth = this.$refs.value?.clientWidth
const clientHeight = this.$refs.value?.clientHeight

// work out how much space we have within which to render the value/icon/range
const minDimension = Math.min(clientWidth || 0, clientHeight || 0)
this.size = 'default'
if (minDimension < 80) {
if (clientWidth < 80) {
this.size = 'xxs'
} else if (minDimension < 150) {
} else if (clientWidth < 150) {
this.size = 'xs'
} else if (minDimension < 225) {
} else if (clientWidth < 225) {
this.size = 'sm'
} else if (minDimension < 300) {
} else if (clientWidth < 300) {
this.size = 'md'
} else {
this.size = 'lg'
Expand Down
Loading