mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Hide unsupported LinkAnnotation
s (issue 3897)
Rather than displaying links that does *nothing* when clicked, it probably makes more sense to simply not render them instead. Especially since it turns out that, at least at this point in time, this is *very* easy to both implement and test. Fixes 3897.
This commit is contained in:
parent
9b14f8ea2a
commit
7115e136e4
4 changed files with 98 additions and 1 deletions
|
@ -251,7 +251,9 @@ class AnnotationElement {
|
|||
|
||||
class LinkAnnotationElement extends AnnotationElement {
|
||||
constructor(parameters) {
|
||||
super(parameters, /* isRenderable = */ true);
|
||||
let isRenderable = !!(parameters.data.url || parameters.data.dest ||
|
||||
parameters.data.action);
|
||||
super(parameters, isRenderable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue