Add methods to set width/height programatically
This commit is contained in:
@@ -102,6 +102,10 @@ class TpHSplitter extends LitElement {
|
||||
document.body.style['userSelect'] = '';
|
||||
}
|
||||
|
||||
setHeight(height) {
|
||||
this.style.gridTemplateRows = `${height} 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