Skip to content

Commit

Permalink
Merge pull request #1772 from OpenC3/release-polish
Browse files Browse the repository at this point in the history
Small bug fixes and enhancements
  • Loading branch information
jmthomas authored Dec 17, 2024
2 parents 6cbf4f0 + e55627b commit 88594fc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,11 @@ export default {
this.saveDefaultConfig(this.currentConfig)
},
cmdOrTlm: function () {
this.saveDefaultConfig(this.currentConfig)
if (this.items.length === 0) { // just to prevent the save from happening twice
this.saveDefaultConfig(this.currentConfig)
} else {
this.items = []
}
},
items: {
handler: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<v-data-table
:search="search"
:headers="headers"
:header-props="{
style: 'width: 50%',
}"
:items="rows"
:custom-filter="filter"
:sort-by="sortBy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,13 @@ export default {
},
computedStyle() {
let style = {}
// note down what the width was in case it was set to AUTO, because absolute positioning will lose that
const origWidth = this.width || this.$refs.bar?.clientWidth
if (this.floated) {
style['position'] = 'absolute'
style['top'] = this.top + 'px'
style['left'] = this.left + 'px'
style['width'] = origWidth + 'px'
}
return style
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ export default {
this.applyStyleSetting(setting)
})

// If nothing has yet defined a width then we add flex to the style
if (this.appliedStyle['width'] === undefined) {
// If nothing has yet defined a width or height then we add flex to the style
if (
this.appliedStyle['width'] === undefined &&
this.appliedStyle['height'] === undefined
) {
// This flex allows for alignment in our widgets
// The value of '0 10 100%' was achieved through trial and error
// The larger flex-shrink value was critical for success
Expand Down

0 comments on commit 88594fc

Please sign in to comment.