Update PDFOutlineViewer_bindLink
to look more like LinkAnnotationElement_bindLink
This commit is contained in:
parent
47a1c7797e
commit
d5e3b2fbf0
@ -299,7 +299,7 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() {
|
|||||||
if (this.data.action) {
|
if (this.data.action) {
|
||||||
this._bindNamedAction(link, this.data.action);
|
this._bindNamedAction(link, this.data.action);
|
||||||
} else {
|
} else {
|
||||||
this._bindLink(link, (this.data.dest || null));
|
this._bindLink(link, this.data.dest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,10 +90,13 @@ var PDFOutlineViewer = (function PDFOutlineViewerClosure() {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var linkService = this.linkService;
|
var self = this, destination = item.dest;
|
||||||
element.href = linkService.getDestinationHash(item.dest);
|
|
||||||
element.onclick = function goToDestination(e) {
|
element.href = self.linkService.getDestinationHash(destination);
|
||||||
linkService.navigateTo(item.dest);
|
element.onclick = function () {
|
||||||
|
if (destination) {
|
||||||
|
self.linkService.navigateTo(destination);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user