* Get the associated popup annotation, if any.
()
| 120 | * Get the associated popup annotation, if any. |
| 121 | */ |
| 122 | getPopup(): PDFPopupAnnotation | null { |
| 123 | if (this._popup !== undefined) { |
| 124 | return this._popup; |
| 125 | } |
| 126 | |
| 127 | const popupRef = this.popupRef; |
| 128 | |
| 129 | if (!popupRef) { |
| 130 | this._popup = null; |
| 131 | |
| 132 | return null; |
| 133 | } |
| 134 | |
| 135 | const popupDict = this.registry.resolve(popupRef); |
| 136 | |
| 137 | if (popupDict instanceof PdfDict) { |
| 138 | this._popup = new PDFPopupAnnotation(popupDict, popupRef, this.registry); |
| 139 | |
| 140 | return this._popup; |
| 141 | } |
| 142 | |
| 143 | this._popup = null; |
| 144 | |
| 145 | return null; |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Create a popup annotation associated with this annotation. |