Merge pull request #11129 from Snuffleupagus/animationStarted-setInitialView
Prevent "offsetParent is not set -- cannot scroll" errors when the viewer loads in e.g. a hidden <iframe>
This commit is contained in:
commit
4fa60f006b
11
web/app.js
11
web/app.js
@ -939,8 +939,13 @@ let PDFViewerApplication = {
|
|||||||
}).catch(() => { /* Unable to read from storage; ignoring errors. */ });
|
}).catch(() => { /* Unable to read from storage; ignoring errors. */ });
|
||||||
|
|
||||||
Promise.all([
|
Promise.all([
|
||||||
storePromise, pageLayoutPromise, pageModePromise, openActionDestPromise,
|
animationStarted,
|
||||||
]).then(async ([values = {}, pageLayout, pageMode, openActionDest]) => {
|
storePromise,
|
||||||
|
pageLayoutPromise,
|
||||||
|
pageModePromise,
|
||||||
|
openActionDestPromise,
|
||||||
|
]).then(async ([timeStamp, values = {}, pageLayout, pageMode,
|
||||||
|
openActionDest]) => {
|
||||||
const viewOnLoad = AppOptions.get('viewOnLoad');
|
const viewOnLoad = AppOptions.get('viewOnLoad');
|
||||||
|
|
||||||
this._initializePdfHistory({
|
this._initializePdfHistory({
|
||||||
@ -1088,7 +1093,7 @@ let PDFViewerApplication = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Promise.all([onePageRendered, animationStarted]).then(() => {
|
onePageRendered.then(() => {
|
||||||
pdfDocument.getOutline().then((outline) => {
|
pdfDocument.getOutline().then((outline) => {
|
||||||
this.pdfOutlineViewer.render({ outline, });
|
this.pdfOutlineViewer.render({ outline, });
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user