Simplify options passed to docRangeFromPoint
This commit is contained in:
parent
4b5138b96e
commit
cab2a39981
@ -106,8 +106,7 @@ function docElementsFromPoint(x, y, all) {
|
||||
return e !== null ? [e] : [];
|
||||
}
|
||||
|
||||
function docRangeFromPoint(x, y, options) {
|
||||
const deepDomScan = options.scanning.deepDomScan;
|
||||
function docRangeFromPoint(x, y, deepDomScan) {
|
||||
const elements = docElementsFromPoint(x, y, deepDomScan);
|
||||
let imposter = null;
|
||||
let imposterContainer = null;
|
||||
|
@ -144,7 +144,7 @@ class Display {
|
||||
try {
|
||||
e.preventDefault();
|
||||
|
||||
const textSource = docRangeFromPoint(e.clientX, e.clientY, this.options);
|
||||
const textSource = docRangeFromPoint(e.clientX, e.clientY, this.options.scanning.deepDomScan);
|
||||
if (textSource === null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ class TextScanner {
|
||||
}
|
||||
}
|
||||
|
||||
const textSource = docRangeFromPoint(x, y, this.options);
|
||||
const textSource = docRangeFromPoint(x, y, this.options.scanning.deepDomScan);
|
||||
if (this.textSourceCurrent !== null && this.textSourceCurrent.equals(textSource)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user