From 6d3037f3d6548b742fa73aec7504c4384f327674 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 14 Sep 2019 14:27:25 -0400 Subject: Remove destructuring from searchAt, containsPoint, docRangeFromPoint --- ext/fg/js/frontend.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/fg/js/frontend.js') diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 9341e492..a6919b37 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -104,7 +104,7 @@ class Frontend { const search = async () => { try { - await this.searchAt({x: e.clientX, y: e.clientY}, 'mouse'); + await this.searchAt(e.clientX, e.clientY, 'mouse'); } catch (e) { this.onError(e); } @@ -280,12 +280,12 @@ class Frontend { } } - async searchAt(point, type) { - if (this.pendingLookup || await this.popup.containsPoint(point)) { + async searchAt(x, y, type) { + if (this.pendingLookup || await this.popup.containsPoint(x, y)) { return; } - const textSource = docRangeFromPoint(point, this.options); + const textSource = docRangeFromPoint(x, y, this.options); let hideResults = textSource === null; let searched = false; let success = false; @@ -470,7 +470,7 @@ class Frontend { const search = async () => { try { - await this.searchAt({x, y}, type); + await this.searchAt(x, y, type); } catch (e) { this.onError(e); } -- cgit v1.2.3