1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #403 from notmasteryet/bookmarks3

an-open-web document outline and bookmarks
This commit is contained in:
vingtetun 2011-08-29 19:23:19 -07:00
commit cd6d2b15d7
2 changed files with 10 additions and 5 deletions

View file

@ -91,7 +91,8 @@ var PDFView = {
return; // invalid destination
// dest array looks like that: <page-ref> </XYZ|FitXXX> <args..>
var destRef = dest[0];
var pageNumber = this.pagesRefMap[destRef.num + ' ' + destRef.gen + ' R'];
var pageNumber = destRef instanceof Object ?
this.pagesRefMap[destRef.num + ' ' + destRef.gen + ' R'] : (destRef + 1);
if (pageNumber) {
this.page = pageNumber;
// TODO scroll to specific region on the page, the precise scaling