File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1366,6 +1366,7 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
1366
1366
1367
1367
this . checkedAppearance = null ;
1368
1368
this . uncheckedAppearance = null ;
1369
+ this . data . isTooltipOnly = false ;
1369
1370
1370
1371
this . data . checkBox =
1371
1372
! this . hasFieldFlag ( AnnotationFieldFlag . RADIO ) &&
@@ -1596,11 +1597,13 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
1596
1597
}
1597
1598
1598
1599
_processPushButton ( params ) {
1599
- if ( ! params . dict . has ( "A" ) ) {
1600
+ if ( ! params . dict . has ( "A" ) && ! params . dict . has ( "TU" ) ) {
1600
1601
warn ( "Push buttons without action dictionaries are not supported" ) ;
1601
1602
return ;
1602
1603
}
1603
1604
1605
+ this . data . isTooltipOnly = ! params . dict . has ( "A" ) ;
1606
+
1604
1607
Catalog . parseDestDictionary ( {
1605
1608
destDict : params . dict ,
1606
1609
resultObj : this . data ,
Original file line number Diff line number Diff line change @@ -165,6 +165,10 @@ class AnnotationElement {
165
165
let width = data . rect [ 2 ] - data . rect [ 0 ] ;
166
166
let height = data . rect [ 3 ] - data . rect [ 1 ] ;
167
167
168
+ if ( this . data . alternativeText ) {
169
+ container . setAttribute ( "title" , this . data . alternativeText ) ;
170
+ }
171
+
168
172
container . setAttribute ( "data-annotation-id" , data . id ) ;
169
173
170
174
// Do *not* modify `data.rect`, since that will corrupt the annotation
@@ -293,8 +297,10 @@ class LinkAnnotationElement extends AnnotationElement {
293
297
const isRenderable = ! ! (
294
298
parameters . data . url ||
295
299
parameters . data . dest ||
296
- parameters . data . action
300
+ parameters . data . action ||
301
+ parameters . data . isTooltipOnly
297
302
) ;
303
+
298
304
super ( parameters , isRenderable ) ;
299
305
}
300
306
@@ -322,8 +328,10 @@ class LinkAnnotationElement extends AnnotationElement {
322
328
} ) ;
323
329
} else if ( data . action ) {
324
330
this . _bindNamedAction ( link , data . action ) ;
325
- } else {
331
+ } else if ( data . dest ) {
326
332
this . _bindLink ( link , data . dest ) ;
333
+ } else {
334
+ this . _bindLink ( link , "" ) ;
327
335
}
328
336
329
337
this . container . appendChild ( link ) ;
You can’t perform that action at this time.
0 commit comments