diff --git a/package.json b/package.json index 218cbc9..af462ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-splitter", - "version": "2.2.0", + "version": "2.2.1", "description": "", "main": "tp-splitter.js", "scripts": { diff --git a/tp-vsplitter.js b/tp-vsplitter.js index 8e102cc..2133df6 100644 --- a/tp-vsplitter.js +++ b/tp-vsplitter.js @@ -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) {