diff --git a/package.json b/package.json index 1d4eff8..218cbc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-splitter", - "version": "2.1.1", + "version": "2.2.0", "description": "", "main": "tp-splitter.js", "scripts": { diff --git a/tp-hsplitter.js b/tp-hsplitter.js index ebb5bf6..330e1e7 100644 --- a/tp-hsplitter.js +++ b/tp-hsplitter.js @@ -106,10 +106,14 @@ class TpHSplitter extends LitElement { document.body.style['userSelect'] = ''; } - setHeight(height) { + setTopHeight(height) { this.style.gridTemplateRows = `${height} var(--tp-splitter-width, 5px) 1fr`; } + setBottomHeight(height) { + this.style.gridTemplateRows = `1fr var(--tp-splitter-width, 5px) ${height}`; + } + _enableDrag(e) { e.preventDefault(); if (this.splitter && e.pointerId != null) {