aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/display.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-09 21:07:11 -0400
committerGitHub <noreply@github.com>2020-08-09 21:07:11 -0400
commit2a86d6609210a586ec32c48a99904c9b64744d04 (patch)
treee87b3a7abb84c1d1dbb51d27de100288d00df155 /ext/mixed/js/display.js
parent9f8f83508e6d8e469b8cd89c1fb3ec85601401d8 (diff)
DOM + DocumentUtil merge (#727)
* Add DOM functions to DocumentUtil * Use DocumentUtil instead of DOM * Remove DOM * Move document-util.js into mixed
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r--ext/mixed/js/display.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 170b9d23..08ececc7 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -17,7 +17,6 @@
/* global
* AudioSystem
- * DOM
* DisplayGenerator
* DisplayHistory
* DocumentUtil
@@ -186,11 +185,11 @@ class Display extends EventDispatcher {
}
onKeyDown(e) {
- const key = DOM.getKeyFromEvent(e);
+ const key = DocumentUtil.getKeyFromEvent(e);
const handlers = this._hotkeys.get(key);
if (typeof handlers === 'undefined') { return false; }
- const eventModifiers = DOM.getActiveModifiers(e);
+ const eventModifiers = DocumentUtil.getActiveModifiers(e);
for (const {modifiers, action} of handlers) {
if (getSetDifference(modifiers, eventModifiers).size !== 0) { continue; }
@@ -558,7 +557,7 @@ class Display extends EventDispatcher {
}
_onGlossaryMouseDown(e) {
- if (DOM.isMouseButtonPressed(e, 'primary')) {
+ if (DocumentUtil.isMouseButtonPressed(e, 'primary')) {
this._clickScanPrevent = false;
}
}
@@ -568,7 +567,7 @@ class Display extends EventDispatcher {
}
_onGlossaryMouseUp(e) {
- if (!this._clickScanPrevent && DOM.isMouseButtonPressed(e, 'primary')) {
+ if (!this._clickScanPrevent && DocumentUtil.isMouseButtonPressed(e, 'primary')) {
try {
this._onTermLookup(e);
} catch (error) {