Skip to content

Commit

Permalink
fix(playground): display the right panel size (#2301)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Mar 6, 2023
1 parent dccfe41 commit 021b34b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playground/src/composables/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const panelSizes = useLocalStorage<number[]>(

export function getInitialPanelSizes(percent: number): number[] {
return [
percent,
100 - percent * 3,
percent,
percent,
percent,
Expand Down Expand Up @@ -63,6 +63,7 @@ export function normalizePanels() {
watch(
titleHeightPercent,
(value: number) => {
panelSizes.value = getInitialPanelSizes(value)
if (panelSizes.value.includes(100))
panelSizes.value = getInitialPanelSizes(value)
},
)

0 comments on commit 021b34b

Please sign in to comment.