diff options
-rw-r--r-- | ui.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ui.js b/ui.js index a20fb52..ac86a47 100644 --- a/ui.js +++ b/ui.js @@ -425,7 +425,7 @@ class GrouplikeListingElement extends FocusElement { this.grouplike = null this.recordStore = recordStore - this.form = new GrouplikeListingForm() + this.form = this.getNewForm() this.addChild(this.form) this.form.on('selected input', input => { @@ -441,6 +441,10 @@ class GrouplikeListingElement extends FocusElement { this.addChild(this.commentLabel) } + getNewForm() { + return new GrouplikeListingForm() + } + fixLayout() { this.commentLabel.w = this.contentW @@ -448,7 +452,7 @@ class GrouplikeListingElement extends FocusElement { this.form.h = this.contentH this.form.y = this.commentLabel.bottom this.form.h -= this.commentLabel.h - this.form.h -= this.pathElement.h + this.form.h -= 1 // For the path element this.pathElement.y = this.contentH - 1 this.pathElement.w = this.contentW @@ -723,16 +727,13 @@ class PathItemElement extends FocusElement { this.arrowLabel.fixLayout() this.w = this.button.w + this.arrowLabel.w this.arrowLabel.x = this.button.right + this.h = 1 } } class QueueListingElement extends GrouplikeListingElement { - constructor(...args) { - super(...args) - - this.removeChild(this.form) - this.form = new QueueListingForm() - this.addChild(this.form) + getNewForm() { + return new QueueListingForm() } keyPressed(keyBuf) { |