mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Add source
parameters to all remaining EventBus.dispatch
calls that are currently missing those
This is necessary for subsequent patches, and will help avoid unnecessary event re-dispatching in cases where the event source is `window`.
This commit is contained in:
parent
283f2dfcc3
commit
486c843215
3 changed files with 18 additions and 15 deletions
|
@ -60,19 +60,19 @@ class PDFPresentationMode {
|
|||
if (contextMenuItems) {
|
||||
contextMenuItems.contextFirstPage.addEventListener('click', () => {
|
||||
this.contextMenuOpen = false;
|
||||
this.eventBus.dispatch('firstpage');
|
||||
this.eventBus.dispatch('firstpage', { source: this, });
|
||||
});
|
||||
contextMenuItems.contextLastPage.addEventListener('click', () => {
|
||||
this.contextMenuOpen = false;
|
||||
this.eventBus.dispatch('lastpage');
|
||||
this.eventBus.dispatch('lastpage', { source: this, });
|
||||
});
|
||||
contextMenuItems.contextPageRotateCw.addEventListener('click', () => {
|
||||
this.contextMenuOpen = false;
|
||||
this.eventBus.dispatch('rotatecw');
|
||||
this.eventBus.dispatch('rotatecw', { source: this, });
|
||||
});
|
||||
contextMenuItems.contextPageRotateCcw.addEventListener('click', () => {
|
||||
this.contextMenuOpen = false;
|
||||
this.eventBus.dispatch('rotateccw');
|
||||
this.eventBus.dispatch('rotateccw', { source: this, });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue