1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Hide unsupported LinkAnnotations (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:
Jonas Jenwald 2017-09-02 10:06:44 +02:00
parent 9b14f8ea2a
commit 7115e136e4
4 changed files with 98 additions and 1 deletions

View file

@ -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);
}
/**