From 1a82a0cad985dc5d6e712c4e6e2f5705ae836ac7 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 13 Jun 2018 08:11:05 -0300 Subject: Fix path element not being updated for queue listing --- ui.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ui.js') 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) { -- cgit 1.3.0-6-gf8a5