Small cleanup in 'set page'
This commit is contained in:
parent
58407cfa94
commit
e4f799a09c
@ -295,7 +295,6 @@ var PDFView = {
|
||||
|
||||
set page(val) {
|
||||
var pages = this.pages;
|
||||
var input = document.getElementById('pageNumber');
|
||||
var event = document.createEvent('UIEvents');
|
||||
event.initUIEvent('pagechange', false, false, window, 0);
|
||||
|
||||
@ -314,13 +313,13 @@ var PDFView = {
|
||||
|
||||
// checking if the this.page was called from the updateViewarea function:
|
||||
// avoiding the creation of two "set page" method (internal and public)
|
||||
if (updateViewarea.inProgress)
|
||||
if (updateViewarea.inProgress) {
|
||||
return;
|
||||
|
||||
}
|
||||
// Avoid scrolling the first page during loading
|
||||
if (this.loading && val == 1)
|
||||
if (this.loading && val === 1) {
|
||||
return;
|
||||
|
||||
}
|
||||
pages[val - 1].scrollIntoView();
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user