[api-minor] Add support for URLs in the document outline

Re: issue 5089.
(Note that since there are other outline features that we currently don't support, e.g. bold/italic text and custom colours, I thus think we can keep the referenced issue open.)
This commit is contained in:
Jonas Jenwald 2015-12-22 12:59:23 +01:00
parent e60fde73ca
commit 0030a82dc3
8 changed files with 67 additions and 20 deletions

View file

@ -62,6 +62,10 @@ var PDFOutlineView = (function PDFOutlineViewClosure() {
* @private
*/
_bindLink: function PDFOutlineView_bindLink(element, item) {
if (item.url) {
PDFJS.addLinkAttributes(element, { url: item.url });
return;
}
var linkService = this.linkService;
element.href = linkService.getDestinationHash(item.dest);
element.onclick = function goToDestination(e) {