Add methods to set width/height programatically
This commit is contained in:
@@ -97,6 +97,10 @@ class TpVSplitter extends LitElement {
|
||||
document.body.style['userSelect'] = '';
|
||||
}
|
||||
|
||||
setWidth(width) {
|
||||
this.style.gridTemplateColumns = `${width} var(--tp-splitter-width, 5px) 1fr`;
|
||||
}
|
||||
|
||||
_enableDrag(e) {
|
||||
document.addEventListener('mouseup', this._disableDrag)
|
||||
document.addEventListener('mousemove', this._resize);
|
||||
|
Reference in New Issue
Block a user