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) {
|
||||
this._bindNamedAction(link, this.data.action);
|
||||
} else {
|
||||
this._bindLink(link, (this.data.dest || null));
|
||||
this._bindLink(link, this.data.dest);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,10 +90,13 @@ var PDFOutlineViewer = (function PDFOutlineViewerClosure() {
|
||||
});
|
||||
return;
|
||||
}
|
||||
var linkService = this.linkService;
|
||||
element.href = linkService.getDestinationHash(item.dest);
|
||||
element.onclick = function goToDestination(e) {
|
||||
linkService.navigateTo(item.dest);
|
||||
var self = this, destination = item.dest;
|
||||
|
||||
element.href = self.linkService.getDestinationHash(destination);
|
||||
element.onclick = function () {
|
||||
if (destination) {
|
||||
self.linkService.navigateTo(destination);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user