From 8383af2345d5266336008c847b4970faf0c44104 Mon Sep 17 00:00:00 2001 From: pk Date: Sun, 2 Nov 2025 23:01:22 +0100 Subject: [PATCH] Add initial height for bottom side. --- package.json | 2 +- tp-hsplitter.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ba5b37d..aef2aea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-splitter", - "version": "1.7.1", + "version": "1.8.0", "description": "", "main": "tp-splitter.js", "scripts": { diff --git a/tp-hsplitter.js b/tp-hsplitter.js index 831a5bd..b3857b7 100644 --- a/tp-hsplitter.js +++ b/tp-hsplitter.js @@ -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}`; } }