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:
Jonas Jenwald 2018-08-28 09:56:26 +02:00
parent 283f2dfcc3
commit 486c843215
3 changed files with 18 additions and 15 deletions

View file

@ -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, });
});
}
}