|
@@ -447,6 +447,7 @@ class ComPDFKitViewer {
|
|
}
|
|
}
|
|
|
|
|
|
setActiveSearchResult(result = null, activeSearchIndex = 0) {
|
|
setActiveSearchResult(result = null, activeSearchIndex = 0) {
|
|
|
|
+ if (!this.searchResults) return
|
|
const activeResult = result ? result : this.searchResults[0]
|
|
const activeResult = result ? result : this.searchResults[0]
|
|
const left = activeResult.left * this.scale
|
|
const left = activeResult.left * this.scale
|
|
const top = activeResult.top * this.scale
|
|
const top = activeResult.top * this.scale
|
|
@@ -477,6 +478,7 @@ class ComPDFKitViewer {
|
|
const _page = this.pdfViewer._pages[i]
|
|
const _page = this.pdfViewer._pages[i]
|
|
_page.clearSearchResults()
|
|
_page.clearSearchResults()
|
|
}
|
|
}
|
|
|
|
+ this.searchResults = null
|
|
}
|
|
}
|
|
|
|
|
|
async getAnnotations() {
|
|
async getAnnotations() {
|