mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Remove the attachDOMEventsToEventBus
functionality, since EventBus
instances are able to re-dispatch events to the DOM (PR 10019, bug 1492849 follow-up)
This also removes the old 'pagechange'/'scalechange'/'documentload' events.
This commit is contained in:
parent
7053b5a146
commit
e2e9657ed0
15 changed files with 41 additions and 188 deletions
|
@ -346,13 +346,13 @@ var PDFViewerApplication = {
|
|||
}
|
||||
});
|
||||
|
||||
container.addEventListener('pagesinit', function () {
|
||||
document.addEventListener('pagesinit', function () {
|
||||
// We can use pdfViewer now, e.g. let's change default scale.
|
||||
pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE;
|
||||
});
|
||||
|
||||
container.addEventListener('pagechange', function (evt) {
|
||||
var page = evt.pageNumber;
|
||||
document.addEventListener('pagechanging', function (evt) {
|
||||
var page = evt.detail.pageNumber;
|
||||
var numPages = PDFViewerApplication.pagesCount;
|
||||
|
||||
document.getElementById('pageNumber').value = page;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue