1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

[Annotations] Draw readonly annotations on their own canvas and show the HTML elements when there is a JS interaction (issue #16384)

This commit is contained in:
Calixte Denizet 2023-05-04 20:08:32 +02:00
parent 2fab583fb4
commit 72da14f005
4 changed files with 27 additions and 1 deletions

View file

@ -1695,7 +1695,8 @@ class WidgetAnnotation extends Annotation {
if (
renderForms &&
!(this instanceof SignatureWidgetAnnotation) &&
!this.data.noHTML
!this.data.noHTML &&
!this.data.hasOwnCanvas
) {
return {
opList: new OperatorList(),
@ -2425,6 +2426,7 @@ class TextWidgetAnnotation extends WidgetAnnotation {
constructor(params) {
super(params);
this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML;
this._hasText = true;
const dict = params.dict;