update pdf.js
This commit is contained in:
parent
971cc04c34
commit
35cb81a19c
60 changed files with 51372 additions and 39252 deletions
|
|
@ -1,13 +1,19 @@
|
|||
Ox.load(function() {
|
||||
window.addEventListener('hashchange', function() {
|
||||
var page = document.location.hash.substring(1).split('=')[1];
|
||||
page && Ox.$parent.postMessage('page', {
|
||||
page: Math.round(page)
|
||||
});
|
||||
var currentPage = PDFView.page;
|
||||
window.addEventListener('pagechange', function (evt) {
|
||||
var page = evt.pageNumber;
|
||||
if (page && page != currentPage) {
|
||||
currentPage = page;
|
||||
Ox.$parent.postMessage('page', {
|
||||
page: Math.round(page)
|
||||
});
|
||||
}
|
||||
});
|
||||
Ox.$parent.onMessage(function(event, data, oxid) {
|
||||
if (event == 'page' && Ox.isUndefined(oxid)) {
|
||||
window.location.hash = '#page=' + data.page;
|
||||
if (data.page != PDFView.page) {
|
||||
PDFView.page = data.page;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue