Add cleanly named methods to set the dimentions of both panels for both splitters.
This commit is contained in:
+5
-1
@@ -106,10 +106,14 @@ class TpHSplitter extends LitElement {
|
||||
document.body.style['userSelect'] = '';
|
||||
}
|
||||
|
||||
setHeight(height) {
|
||||
setTopHeight(height) {
|
||||
this.style.gridTemplateRows = `${height} var(--tp-splitter-width, 5px) 1fr`;
|
||||
}
|
||||
|
||||
setBottomHeight(height) {
|
||||
this.style.gridTemplateRows = `1fr var(--tp-splitter-width, 5px) ${height}`;
|
||||
}
|
||||
|
||||
_enableDrag(e) {
|
||||
e.preventDefault();
|
||||
if (this.splitter && e.pointerId != null) {
|
||||
|
||||
Reference in New Issue
Block a user