Dispatch a metadataloaded
event once the PDFViewerApplication._initializeMetadata
method is done
This will be useful in the following patch, and note that there's also an old issue (see 5765) which asked for such an event. However, given that the use-case wasn't *clearly* specified, and that we didn't have an internal use for it at the time it wasn't implemented. Also, ensure that all of the metadata-related properties are actually reset when the document is closed.
This commit is contained in:
parent
c549069ebd
commit
f8ea83609f
@ -248,7 +248,9 @@ const PDFViewerApplication = {
|
||||
url: "",
|
||||
baseUrl: "",
|
||||
externalServices: DefaultExternalServices,
|
||||
_boundEvents: {},
|
||||
_boundEvents: Object.create(null),
|
||||
documentInfo: null,
|
||||
metadata: null,
|
||||
contentDispositionFilename: null,
|
||||
triggerDelayedFallback: null,
|
||||
_saveInProgress: false,
|
||||
@ -789,6 +791,8 @@ const PDFViewerApplication = {
|
||||
this.downloadComplete = false;
|
||||
this.url = "";
|
||||
this.baseUrl = "";
|
||||
this.documentInfo = null;
|
||||
this.metadata = null;
|
||||
this.contentDispositionFilename = null;
|
||||
this.triggerDelayedFallback = null;
|
||||
this._saveInProgress = false;
|
||||
@ -1652,6 +1656,8 @@ const PDFViewerApplication = {
|
||||
generator: generatorId,
|
||||
formType,
|
||||
});
|
||||
|
||||
this.eventBus.dispatch("metadataloaded", { source: this });
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user