mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Lifting up this.xref; buttons tooltips
This commit is contained in:
parent
94eac2466e
commit
d664652b86
2 changed files with 8 additions and 7 deletions
7
pdf.js
7
pdf.js
|
@ -3438,9 +3438,10 @@ var Catalog = (function() {
|
|||
return str;
|
||||
}
|
||||
var obj = this.catDict.get('Outlines');
|
||||
var xref = this.xref;
|
||||
var root = { items: [] };
|
||||
if (IsRef(obj)) {
|
||||
obj = this.xref.fetch(obj).get('First');
|
||||
obj = xref.fetch(obj).get('First');
|
||||
var processed = new RefSet();
|
||||
if (IsRef(obj)) {
|
||||
var queue = [{obj: obj, parent: root}];
|
||||
|
@ -3449,12 +3450,12 @@ var Catalog = (function() {
|
|||
processed.put(obj);
|
||||
while (queue.length > 0) {
|
||||
var i = queue.shift();
|
||||
var outlineDict = this.xref.fetch(i.obj);
|
||||
var outlineDict = xref.fetch(i.obj);
|
||||
if (!outlineDict.has('Title'))
|
||||
error('Invalid outline item');
|
||||
var dest = outlineDict.get('A');
|
||||
if (dest)
|
||||
dest = this.xref.fetchIfRef(dest).get('D');
|
||||
dest = xref.fetchIfRef(dest).get('D');
|
||||
else if (outlineDict.has('Dest')) {
|
||||
dest = outlineDict.get('Dest');
|
||||
if (IsName(dest))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue