Merge pull request #13935 from Snuffleupagus/TextHighlighter-tweaks
A couple of small `TextHighlighter`/`TextLayerBuilder` tweaks (PR 13908 follow-up)
This commit is contained in:
commit
ada283cc35
@ -167,7 +167,7 @@ class TextHighlighter {
|
||||
|
||||
function appendTextToDiv(divIdx, fromOffset, toOffset, className) {
|
||||
let div = textDivs[divIdx];
|
||||
if (div.nodeType === 3) {
|
||||
if (div.nodeType === Node.TEXT_NODE) {
|
||||
const span = document.createElement("span");
|
||||
div.parentNode.insertBefore(span, div);
|
||||
span.appendChild(div);
|
||||
|
@ -49,9 +49,7 @@ class TextLayerBuilder {
|
||||
this.textContentItemsStr = [];
|
||||
this.textContentStream = null;
|
||||
this.renderingDone = false;
|
||||
this.pageIdx = pageIndex;
|
||||
this.pageNumber = this.pageIdx + 1;
|
||||
this.matches = [];
|
||||
this.pageNumber = pageIndex + 1;
|
||||
this.viewport = viewport;
|
||||
this.textDivs = [];
|
||||
this.textLayerRenderTask = null;
|
||||
|
Loading…
Reference in New Issue
Block a user