mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[api-minor] Deprecate getGlobalEventBus
and update the "viewer components" examples accordingly
To avoid outright breaking third-party usages of the "viewer components" the `getGlobalEventBus` functionality is left intact, but a deprecation message is printed if the function is invoked. The various examples are updated to *explicitly* initialize an `EventBus` instance, and provide that when initializing the relevant viewer components.
This commit is contained in:
parent
965ebe63fd
commit
9a437a158f
16 changed files with 68 additions and 34 deletions
|
@ -444,7 +444,8 @@ class PDFPageView {
|
|||
textLayerDiv,
|
||||
this.id - 1,
|
||||
this.viewport,
|
||||
this.textLayerMode === TextLayerMode.ENABLE_ENHANCE
|
||||
this.textLayerMode === TextLayerMode.ENABLE_ENHANCE,
|
||||
this.eventBus
|
||||
);
|
||||
}
|
||||
this.textLayer = textLayer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue