Add initial height for bottom side.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tp/tp-splitter",
|
||||
"version": "1.7.1",
|
||||
"version": "1.8.0",
|
||||
"description": "",
|
||||
"main": "tp-splitter.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user