Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# GNU Affero General Public License for more details.

# Modified by OpenC3, Inc.
# All changes Copyright 2022, OpenC3, Inc.
# All changes Copyright 2025, OpenC3, Inc.
# All Rights Reserved
#
# This file may also be used under the terms of a commercial license
Expand All @@ -34,14 +34,17 @@
</template>

<script>
// When we apply a fixed character width we need to pad a bit since the
// width applies to the enclosing div and not the underlying input
const INPUT_PADDING = 4
import Widget from './Widget'
import ValueWidget from './ValueWidget.vue'

export default {
mixins: [Widget],
components: {
ValueWidget,
},
mixins: [Widget],
computed: {
getParameters() {
return [
Expand All @@ -53,7 +56,11 @@ export default {
},
},
created() {
this.setWidth(this.parameters[5], 'ch', 12)
this.setWidth(
parseInt(this.parameters[5]) + INPUT_PADDING,
'ch',
12 + INPUT_PADDING,
)
},
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# GNU Affero General Public License for more details.

# Modified by OpenC3, Inc.
# All changes Copyright 2022, OpenC3, Inc.
# All changes Copyright 2025, OpenC3, Inc.
# All Rights Reserved
#
# This file may also be used under the terms of a commercial license
Expand Down Expand Up @@ -49,17 +49,17 @@ import ValueWidget from './ValueWidget.vue'
import { OpenC3Api } from '@openc3/js-common/services'

export default {
components: {
LabelWidget,
ValueWidget,
},
mixins: [Widget],
data() {
return {
description: '',
valueParameters: [],
}
},
components: {
LabelWidget,
ValueWidget,
},
computed: {
labelName() {
return [this.description]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# GNU Affero General Public License for more details.

# Modified by OpenC3, Inc.
# All changes Copyright 2024, OpenC3, Inc.
# All changes Copyright 2025, OpenC3, Inc.
# All Rights Reserved
#
# This file may also be used under the terms of a commercial license
Expand Down Expand Up @@ -87,9 +87,9 @@ export default {
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
this.appliedStyle['flex'] = '0 10 100%' // flex-grow, flex-shrink, flex-basis
// The value of '1 1 auto' means allow items to grow and shrink proportionally
// and by default try to take an equal portion of the parent
this.appliedStyle['flex'] = '1 1 auto' // flex-grow, flex-shrink, flex-basis
}
return this.appliedStyle
},
Expand Down
Loading