mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Move the _isOffscreenCanvasSupported
property to the base Annotation
class
Having just played around with adding FreeText-annotations and then trying to print, there were `FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.` messages printed in the console. The reason for this is that `FreeTextAnnotation` inherits from `MarkupAnnotation`, however only `WidgetAnnotation` actually defines the `_isOffscreenCanvasSupported` property.
This commit is contained in:
parent
e089d07994
commit
f358e76f5b
1 changed files with 1 additions and 1 deletions
|
@ -524,6 +524,7 @@ class Annotation {
|
|||
this.data.pageIndex = params.pageIndex;
|
||||
}
|
||||
|
||||
this._isOffscreenCanvasSupported = params.isOffscreenCanvasSupported;
|
||||
this._fallbackFontDict = null;
|
||||
this._needAppearances = false;
|
||||
}
|
||||
|
@ -1519,7 +1520,6 @@ class WidgetAnnotation extends Annotation {
|
|||
const data = this.data;
|
||||
this.ref = params.ref;
|
||||
this._needAppearances = params.needAppearances;
|
||||
this._isOffscreenCanvasSupported = params.isOffscreenCanvasSupported;
|
||||
|
||||
data.annotationType = AnnotationType.WIDGET;
|
||||
if (data.fieldName === undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue