mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Simplify the "fileattachmentannotation"-event handling a little bit
*This patch can be tested, in the viewer, using the `annotation-fileattachment.pdf` document from the test-suite.*
Note how the `FileSpec`-implementation already uses `stringToPDFString` during the filename lookup, see cfac6fa511/src/core/file_spec.js (L70)
Hence there's no reason to repeat that again in the `FileAttachmentAnnotationElement`-constructor, and we can thus simplify the "fileattachmentannotation"-event handling a little bit.
This commit is contained in:
parent
cfac6fa511
commit
7f40ef41a5
2 changed files with 7 additions and 14 deletions
|
@ -23,7 +23,6 @@ import {
|
|||
AnnotationType,
|
||||
assert,
|
||||
shadow,
|
||||
stringToPDFString,
|
||||
unreachable,
|
||||
Util,
|
||||
warn,
|
||||
|
@ -2296,7 +2295,6 @@ class FileAttachmentAnnotationElement extends AnnotationElement {
|
|||
|
||||
this.linkService.eventBus?.dispatch("fileattachmentannotation", {
|
||||
source: this,
|
||||
id: stringToPDFString(filename),
|
||||
filename,
|
||||
content,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue