delete dead code
This commit is contained in:
parent
ecb007d052
commit
7398e74d71
@ -75,7 +75,7 @@ class Driver {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const searcher = () => this.searchAt(this.lastMousePos, false);
|
const searcher = () => this.searchAt(this.lastMousePos);
|
||||||
if (!this.popup.isVisible() || e.shiftKey || e.which === 2 /* mmb */) {
|
if (!this.popup.isVisible() || e.shiftKey || e.which === 2 /* mmb */) {
|
||||||
searcher();
|
searcher();
|
||||||
} else {
|
} else {
|
||||||
@ -98,17 +98,13 @@ class Driver {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
searchAt(point, hideNotFound) {
|
searchAt(point) {
|
||||||
if (this.pendingLookup) {
|
if (this.pendingLookup) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const textSource = textSourceFromPoint(point, this.options.scanning.imposter);
|
const textSource = textSourceFromPoint(point, this.options.scanning.imposter);
|
||||||
if (textSource === null || !textSource.containsPoint(point)) {
|
if (textSource === null || !textSource.containsPoint(point)) {
|
||||||
if (hideNotFound) {
|
|
||||||
this.searchClear();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,11 +115,7 @@ class Driver {
|
|||||||
this.pendingLookup = true;
|
this.pendingLookup = true;
|
||||||
this.searchTerms(textSource).then(found => {
|
this.searchTerms(textSource).then(found => {
|
||||||
if (!found) {
|
if (!found) {
|
||||||
return this.searchKanji(textSource).then(found => {
|
return this.searchKanji(textSource);
|
||||||
if (!found && hideNotFound) {
|
|
||||||
this.searchClear();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.handleError(error, textSource);
|
this.handleError(error, textSource);
|
||||||
|
Loading…
Reference in New Issue
Block a user