diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-14 14:27:25 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-14 14:27:25 -0400 |
commit | 6d3037f3d6548b742fa73aec7504c4384f327674 (patch) | |
tree | 425698af2775a224d56e0ed9187d6f3cfaa4e663 /ext/fg/js/frontend.js | |
parent | 89941d404cdae213ad6c609051de3d206f433beb (diff) |
Remove destructuring from searchAt, containsPoint, docRangeFromPoint
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r-- | ext/fg/js/frontend.js | 10 |
1 files changed, 5 insertions, 5 deletions
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); } |