diff options
author | Florrie <towerofnix@gmail.com> | 2020-05-06 18:54:10 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2020-05-06 19:05:22 -0300 |
commit | edae3f7b6fa0ed38a3d54bb339d7c55182f82281 (patch) | |
tree | 773cfe99e1c8b6fe0d4c196de7956d19d16a53ce | |
parent | 705c424332fb92ff3ce1fc3b35b2f18bd9e4c8e3 (diff) |
refactor to use 'select' instead of 'selected'
-rw-r--r-- | ui.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui.js b/ui.js index 7bbfd84..d223f18 100644 --- a/ui.js +++ b/ui.js @@ -736,7 +736,7 @@ class AppElement extends FocusElement { grouplikeListing.pathElement.on('select', item => this.reveal(item)) grouplikeListing.on('menu', (item, el) => this.showMenuForItemElement(el, grouplikeListing)) /* - grouplikeListing.on('selected', item => this.editNotesFile(item, false)) + grouplikeListing.on('select', item => this.editNotesFile(item, false)) grouplikeListing.on('edit-notes', item => { this.reveal(item) this.editNotesFile(item, true) @@ -1623,11 +1623,11 @@ class GrouplikeListingElement extends Form { this.form = this.getNewForm() this.addInput(this.form) - this.form.on('selected', input => { + this.form.on('select', input => { if (input && this.pathElement) { this.pathElement.showItem(input.item) this.autoscroll() - this.emit('selected', input.item) + this.emit('select', input.item) } }) @@ -1680,7 +1680,7 @@ class GrouplikeListingElement extends Form { selected() { this.curIndex = 0 this.root.select(this.form) - this.emit('selected', this.currentItem) + this.emit('select', this.currentItem) } clicked(button) { @@ -2027,7 +2027,7 @@ class GrouplikeListingForm extends ListScrollForm { set curIndex(newIndex) { this.setDep('curIndex', newIndex) - this.emit('selected', this.inputs[this.curIndex]) + this.emit('select', this.inputs[this.curIndex]) return newIndex } @@ -3515,7 +3515,7 @@ class Tabber extends FocusElement { this.listElement = new TabberList(this) this.addChild(this.listElement) - this.listElement.on('selected', item => this.selectTab(item)) + this.listElement.on('select', item => this.selectTab(item)) this.listElement.on('next tab', () => this.nextTab()) this.listElement.on('previous tab', () => this.previousTab()) } @@ -3649,7 +3649,7 @@ class TabberList extends ListScrollForm { const element = new TabberListItem(item, this.tabber) this.addInput(element) element.fixLayout() - element.on('selected', () => this.emit('selected', item)) + element.on('select', () => this.emit('select', item)) } this.scrollToEnd() @@ -3722,7 +3722,7 @@ class TabberListItem extends FocusElement { clicked(button) { if (button === 'left') { - this.emit('selected') + this.emit('select') return false } } |