Remove Display.dependencies
This commit is contained in:
parent
6da7683552
commit
537d2ef532
@ -31,8 +31,6 @@ class DisplaySearch extends Display {
|
|||||||
this.intro = document.querySelector('#intro');
|
this.intro = document.querySelector('#intro');
|
||||||
this.introVisible = true;
|
this.introVisible = true;
|
||||||
this.introAnimationTimer = null;
|
this.introAnimationTimer = null;
|
||||||
|
|
||||||
this.dependencies = Object.assign({}, this.dependencies, {docRangeFromPoint, docSentenceExtract});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static create() {
|
static create() {
|
||||||
|
@ -28,8 +28,6 @@ class DisplayFloat extends Display {
|
|||||||
url: window.location.href
|
url: window.location.href
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dependencies = Object.assign({}, this.dependencies, {docRangeFromPoint, docSentenceExtract});
|
|
||||||
|
|
||||||
window.addEventListener('message', (e) => this.onMessage(e), false);
|
window.addEventListener('message', (e) => this.onMessage(e), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,8 +35,6 @@ class Display {
|
|||||||
this.interactive = false;
|
this.interactive = false;
|
||||||
this.eventListenersActive = false;
|
this.eventListenersActive = false;
|
||||||
|
|
||||||
this.dependencies = {};
|
|
||||||
|
|
||||||
this.windowScroll = new WindowScroll();
|
this.windowScroll = new WindowScroll();
|
||||||
|
|
||||||
this.setInteractive(true);
|
this.setInteractive(true);
|
||||||
@ -86,8 +84,6 @@ class Display {
|
|||||||
try {
|
try {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const {docRangeFromPoint, docSentenceExtract} = this.dependencies;
|
|
||||||
|
|
||||||
const clickedElement = e.target;
|
const clickedElement = e.target;
|
||||||
const textSource = docRangeFromPoint(e.clientX, e.clientY, this.options);
|
const textSource = docRangeFromPoint(e.clientX, e.clientY, this.options);
|
||||||
if (textSource === null) {
|
if (textSource === null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user