|
|
@ -36,6 +36,7 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
this.pageIdx = options.pageIndex; |
|
|
|
this.pageIdx = options.pageIndex; |
|
|
|
this.matches = []; |
|
|
|
this.matches = []; |
|
|
|
this.lastScrollSource = options.lastScrollSource; |
|
|
|
this.lastScrollSource = options.lastScrollSource; |
|
|
|
|
|
|
|
this.isViewerInPresentationMode = options.isViewerInPresentationMode; |
|
|
|
|
|
|
|
|
|
|
|
if(typeof PDFFindController === 'undefined') { |
|
|
|
if(typeof PDFFindController === 'undefined') { |
|
|
|
window.PDFFindController = null; |
|
|
|
window.PDFFindController = null; |
|
|
@ -304,8 +305,9 @@ var TextLayerBuilder = function textLayerBuilder(options) { |
|
|
|
|
|
|
|
|
|
|
|
var isSelected = isSelectedPage && i === selectedMatchIdx; |
|
|
|
var isSelected = isSelectedPage && i === selectedMatchIdx; |
|
|
|
var highlightSuffix = (isSelected ? ' selected' : ''); |
|
|
|
var highlightSuffix = (isSelected ? ' selected' : ''); |
|
|
|
if (isSelected) |
|
|
|
if (isSelected && !this.isViewerInPresentationMode) { |
|
|
|
scrollIntoView(textDivs[begin.divIdx], {top: -50}); |
|
|
|
scrollIntoView(textDivs[begin.divIdx], { top: -50 }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Match inside new div.
|
|
|
|
// Match inside new div.
|
|
|
|
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { |
|
|
|
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { |
|
|
|