aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-24 21:16:23 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-28 17:03:42 -0400
commita648e0509120d401611d8f3f1a7f518d200930d2 (patch)
tree6d013e6083ee61ece1bd69d4be40a3f2da5c5958 /ext
parent9178636613461c1e333abbb9c67e7c82948fdfeb (diff)
Improve naming
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frontend.js46
1 files changed, 23 insertions, 23 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 6d4ba4f8..0743628c 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -32,10 +32,10 @@ class Frontend {
};
this.primaryTouchIdentifier = null;
- this.contextMenuPrevent = false;
- this.mouseDownPrevent = false;
- this.clickPrevent = false;
- this.scrollPrevent = false;
+ this.preventNextContextMenu = false;
+ this.preventNextMouseDown = false;
+ this.preventNextClick = false;
+ this.preventScroll = false;
this.enabled = false;
this.eventListeners = [];
@@ -111,9 +111,9 @@ class Frontend {
}
onMouseDown(e) {
- if (this.mouseDownPrevent) {
- this.mouseDownPrevent = false;
- this.clickPrevent = true;
+ if (this.preventNextMouseDown) {
+ this.preventNextMouseDown = false;
+ this.preventNextClick = true;
e.preventDefault();
e.stopPropagation();
return false;
@@ -147,8 +147,8 @@ class Frontend {
}
onClick(e) {
- if (this.clickPrevent) {
- this.clickPrevent = false;
+ if (this.preventNextClick) {
+ this.preventNextClick = false;
e.preventDefault();
e.stopPropagation();
return false;
@@ -185,7 +185,7 @@ class Frontend {
}
onTouchMove(e) {
- if (!this.scrollPrevent || !e.cancelable || this.primaryTouchIdentifier === null) {
+ if (!this.preventScroll || !e.cancelable || this.primaryTouchIdentifier === null) {
return;
}
@@ -202,8 +202,8 @@ class Frontend {
}
onContextMenu(e) {
- if (this.contextMenuPrevent) {
- this.contextMenuPrevent = false;
+ if (this.preventNextContextMenu) {
+ this.preventNextContextMenu = false;
e.preventDefault();
e.stopPropagation();
return false;
@@ -434,19 +434,19 @@ class Frontend {
setPrimaryTouch(touch) {
if (touch === null) {
this.primaryTouchIdentifier = null;
- this.scrollPrevent = false;
- this.clickPrevent = false;
+ this.preventScroll = false;
+ this.preventNextClick = false;
// Don't revert context menu and mouse down prevention,
// since these events can occur after the touch has ended.
- // this.contextMenuPrevent = false;
- // this.mouseDownPrevent = false;
+ // this.preventNextContextMenu = false;
+ // this.preventNextMouseDown = false;
}
else {
this.primaryTouchIdentifier = touch.identifier;
- this.scrollPrevent = false;
- this.contextMenuPrevent = false;
- this.mouseDownPrevent = false;
- this.clickPrevent = false;
+ this.preventScroll = false;
+ this.preventNextContextMenu = false;
+ this.preventNextMouseDown = false;
+ this.preventNextClick = false;
const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null;
@@ -460,9 +460,9 @@ class Frontend {
return;
}
- this.scrollPrevent = true;
- this.contextMenuPrevent = true;
- this.mouseDownPrevent = true;
+ this.preventScroll = true;
+ this.preventNextContextMenu = true;
+ this.preventNextMouseDown = true;
});
}
}