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",
"version": "2.2.0",
"version": "2.2.1",
"description": "",
"main": "tp-splitter.js",
"scripts": {
+5 -1
View File
@@ -105,10 +105,14 @@ class TpVSplitter extends LitElement {
document.body.style['userSelect'] = '';
}
setWidth(width) {
setLeftWidth(width) {
this.style.gridTemplateColumns = `${width} var(--tp-splitter-width, 5px) 1fr`;
}
setRightWidth(width) {
this.style.gridTemplateColumns = `1fr var(--tp-splitter-width, 5px) ${width}`;
}
_enableDrag(e) {
e.preventDefault();
if (this.splitter && e.pointerId != null) {