|
@@ -2547,6 +2547,24 @@ class ComPDFKitViewer {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ selectAnnotation(annotation) {
|
|
|
+ const pageIndex = annotation.pageIndex
|
|
|
+ const pageView = this.pdfViewer._pages[pageIndex]
|
|
|
+ if (!pageView) return
|
|
|
+ pageView.selectAnnotation(annotation)
|
|
|
+ }
|
|
|
+
|
|
|
+ jumpToAnnotation(annotation) {
|
|
|
+ const { rect, pageIndex } = annotation
|
|
|
+ const left = rect.left * this.scale
|
|
|
+ const top = rect.top * this.scale
|
|
|
+ const pageView = this.pdfViewer._pages[pageIndex]
|
|
|
+ scrollIntoView(pageView.div, {
|
|
|
+ left,
|
|
|
+ top
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
webViewerPageMode({ mode }) {
|
|
|
// Handle the 'pagemode' hash parameter, see also `PDFLinkService_setHash`.
|
|
|
let view;
|
|
@@ -4067,7 +4085,7 @@ class ComPDFKitViewer {
|
|
|
|
|
|
setAnnotator(name) {
|
|
|
this.annotator = name
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
handleTextPopup(tool) {
|
|
|
this.eventBus.dispatch('textPopupClicked', tool);
|