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

Merge pull request #16508 from calixteman/restore_mk_annotation_layer_an_object

[api-minor] Make the AnnotationLayer an object in order to use it in the AnnotationEditorLayer
This commit is contained in:
calixteman 2023-06-02 23:12:50 +02:00 committed by GitHub
commit 63b61ca082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 52 deletions

View file

@ -224,15 +224,17 @@ class Rasterize {
// Rendering annotation layer as HTML.
const parameters = {
viewport: annotationViewport,
div,
annotations,
page,
linkService: new SimpleLinkService(),
imageResourcesPath,
renderForms,
annotationCanvasMap: annotationImageMap,
};
AnnotationLayer.render(parameters);
const annotationLayer = new AnnotationLayer({
div,
annotationCanvasMap: annotationImageMap,
});
annotationLayer.render(parameters);
await l10n.translate(div);
// Inline SVG images from text annotations.