Add initial height for bottom side.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-splitter",
|
"name": "@tp/tp-splitter",
|
||||||
"version": "1.7.1",
|
"version": "1.8.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-splitter.js",
|
"main": "tp-splitter.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class TpHSplitter extends LitElement {
|
|||||||
minSideHeight: { type: Number },
|
minSideHeight: { type: Number },
|
||||||
lateResize: { type: Boolean },
|
lateResize: { type: Boolean },
|
||||||
initialTopHeight: { type: String },
|
initialTopHeight: { type: String },
|
||||||
|
initialBottomHeight: { type: String },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,6 +93,8 @@ class TpHSplitter extends LitElement {
|
|||||||
firstUpdated() {
|
firstUpdated() {
|
||||||
if (this.initialTopHeight) {
|
if (this.initialTopHeight) {
|
||||||
this.style.gridTemplateRows = `${this.initialTopHeight} var(--tp-splitter-width, 5px) 1fr`;
|
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