Add missing refactor

This commit is contained in:
2026-06-21 22:34:00 +02:00
parent 4c58d9b64a
commit 7f192a814a
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@tp/tp-splitter", "name": "@tp/tp-splitter",
"version": "2.2.0", "version": "2.2.1",
"description": "", "description": "",
"main": "tp-splitter.js", "main": "tp-splitter.js",
"scripts": { "scripts": {
+5 -1
View File
@@ -105,10 +105,14 @@ class TpVSplitter extends LitElement {
document.body.style['userSelect'] = ''; document.body.style['userSelect'] = '';
} }
setWidth(width) { setLeftWidth(width) {
this.style.gridTemplateColumns = `${width} var(--tp-splitter-width, 5px) 1fr`; this.style.gridTemplateColumns = `${width} var(--tp-splitter-width, 5px) 1fr`;
} }
setRightWidth(width) {
this.style.gridTemplateColumns = `1fr var(--tp-splitter-width, 5px) ${width}`;
}
_enableDrag(e) { _enableDrag(e) {
e.preventDefault(); e.preventDefault();
if (this.splitter && e.pointerId != null) { if (this.splitter && e.pointerId != null) {