summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-24 21:27:35 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-28 17:03:42 -0400
commit131dc8397dd453839843dbdc493dc721e51496fb (patch)
tree58a4d0fe3278295725878769a3ce2ef954cd32ce
parenta648e0509120d401611d8f3f1a7f518d200930d2 (diff)
Make selectionContainsPoint static
-rw-r--r--ext/fg/js/frontend.js4
1 files changed, 2 insertions, 2 deletions
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()) {