mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Various improvements for GoToR
actions
- Add support for the 'NewWindow' property. - Ensure that destinations are applied to the *remote* document, instead of the current one. - Handle the `F` entry being a standard string, instead of a dictionary.
This commit is contained in:
parent
b63ef7a8b6
commit
f3f825cc71
3 changed files with 32 additions and 12 deletions
|
@ -31,6 +31,7 @@ var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType;
|
|||
var AnnotationType = sharedUtil.AnnotationType;
|
||||
var Util = sharedUtil.Util;
|
||||
var addLinkAttributes = displayDOMUtils.addLinkAttributes;
|
||||
var LinkTarget = displayDOMUtils.LinkTarget;
|
||||
var getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl;
|
||||
var warn = sharedUtil.warn;
|
||||
var CustomStyle = displayDOMUtils.CustomStyle;
|
||||
|
@ -278,7 +279,10 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() {
|
|||
this.container.className = 'linkAnnotation';
|
||||
|
||||
var link = document.createElement('a');
|
||||
addLinkAttributes(link, { url: this.data.url });
|
||||
addLinkAttributes(link, {
|
||||
url: this.data.url,
|
||||
target: (this.data.newWindow ? LinkTarget.BLANK : undefined),
|
||||
});
|
||||
|
||||
if (!this.data.url) {
|
||||
if (this.data.action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue