From d7c5631264c48e07a8383fb46b453b2b4d8a3637 Mon Sep 17 00:00:00 2001 From: Florrie Date: Thu, 7 Jun 2018 22:15:49 -0300 Subject: Remove page up/down controls from ListScrollForm These are unfortunately based on the assumption that every input is exactly one character tall, and definitely don't work with horizontal scrollers, so I had to remove them. --- ui/form/ListScrollForm.js | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'ui') diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js index 00a6da1..a6de8db 100644 --- a/ui/form/ListScrollForm.js +++ b/ui/form/ListScrollForm.js @@ -73,14 +73,6 @@ module.exports = class ListScrollForm extends Form { } } - if (telc.isPageUp(keyBuf)) { - this.previousPage() - ret = false; break handleKeyPress - } else if (telc.isPageDown(keyBuf)) { - this.nextPage() - ret = false; break handleKeyPress - } - ret = super.keyPressed(keyBuf) } @@ -116,26 +108,6 @@ module.exports = class ListScrollForm extends Form { super.firstInput(...args) } - previousPage() { - this.curIndex -= this.h - this.scrollItems -= this.h - if (this.curIndex < 0) { - this.curIndex = 0 - this.scrollItems = 0 - } - this.updateSelectedElement() - } - - nextPage() { - this.curIndex += this.h - this.scrollItems += this.h - if (this.curIndex >= this.inputs.length) { - this.curIndex = this.inputs.length - 1 - this.scrollToEnd() - } - this.updateSelectedElement() - } - scrollElementIntoEndOfView(element) { // We can decide how many items to scroll past by moving forward until // the item's far edge is visible. -- cgit 1.3.0-6-gf8a5