Skip to content

Commit d5a8f66

Browse files
committed
fix extra pane sometimes having 0 widht
1 parent ee7bd2b commit d5a8f66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/src/components/GraphScreenExtraPane.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ const showed = computed(() => !!appStore.inspectedKubeObject);
3131
3232
watch(showed, (showed) => {
3333
if (showed) {
34-
if (width.value === 0) {
34+
if (width.value < minWidth) {
3535
width.value = Math.max(minWidth, props.maxWidth / 3); // 1/3 of the screen's main pane width unless it's too small
3636
}
3737
if (width.value > props.maxWidth) {
38-
width.value = props.maxWidth;
38+
// Seems like sometimes maxWidth can be 0... Probably when the real screen size is not known upon the component's mount
39+
width.value = Math.max(minWidth, props.maxWidth);
3940
}
4041
containerRef.value.style["flex-basis"] = width.value + "px";
4142
} else {

0 commit comments

Comments
 (0)