fix(pdfjs-annotation-viewer): initialize konvaClientRect dimensions and add HASH_PARAMS implementation
Updated the pdfjs-annotation-extension-testdata.json to set default dimensions for konvaClientRect to zero. Added a HASH_PARAMS implementation in viewer.html to handle hash parsing, ensuring compatibility with the pdfjs-annotation-extension bundle and preventing runtime errors.
This commit is contained in:
@@ -91,11 +91,6 @@ function setupAnnotationViewer(iframe: HTMLIFrameElement) {
|
||||
stampBtn.disabled = false
|
||||
}
|
||||
|
||||
const AnnotationEditorType = win.pdfjsLib?.AnnotationEditorType
|
||||
if (app?.pdfViewer && AnnotationEditorType?.STAMP != null) {
|
||||
app.pdfViewer.annotationEditorMode = AnnotationEditorType.STAMP
|
||||
}
|
||||
|
||||
const root = doc.querySelector('.PdfjsAnnotationExtension') as HTMLElement | null
|
||||
if (root) {
|
||||
root.classList.add('PdfjsAnnotationExtension_Comment_hidden')
|
||||
|
||||
Reference in New Issue
Block a user