From 131dc8397dd453839843dbdc493dc721e51496fb Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 24 Oct 2019 21:27:35 -0400 Subject: Make selectionContainsPoint static --- ext/fg/js/frontend.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 0743628c..8a08f105 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -161,7 +161,7 @@ class Frontend { } let touch = this.getPrimaryTouch(e.changedTouches); - if (this.selectionContainsPoint(window.getSelection(), touch.clientX, touch.clientY)) { + if (Frontend.selectionContainsPoint(window.getSelection(), touch.clientX, touch.clientY)) { touch = null; } @@ -467,7 +467,7 @@ class Frontend { } } - selectionContainsPoint(selection, x, y) { + static selectionContainsPoint(selection, x, y) { for (let i = 0; i < selection.rangeCount; ++i) { const range = selection.getRangeAt(i); for (const rect of range.getClientRects()) { -- cgit v1.2.3