Add initial height for bottom side.

This commit is contained in:
2025-11-02 23:01:22 +01:00
parent f43a1dceaa
commit 8383af2345
2 changed files with 4 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ class TpHSplitter extends LitElement {
minSideHeight: { type: Number },
lateResize: { type: Boolean },
initialTopHeight: { type: String },
initialBottomHeight: { type: String },
};
}
@@ -92,6 +93,8 @@ class TpHSplitter extends LitElement {
firstUpdated() {
if (this.initialTopHeight) {
this.style.gridTemplateRows = `${this.initialTopHeight} var(--tp-splitter-width, 5px) 1fr`;
} else if (this.initialBottomHeight) {
this.style.gridTemplateRows = `1fr var(--tp-splitter-width, 5px) ${this.initialBottomHeight}`;
}
}