mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Support rotating editor layer
- As in the annotation layer, use percent instead of pixels as unit; - handle the rotation of the editor layer in allowing editing when rotation angle is not zero; - the different editors are rotated counterclockwise in order to be usable when the main page is itself rotated; - add support for saving/printing rotated editors.
This commit is contained in:
parent
b5fea8ff14
commit
0c420f5135
13 changed files with 473 additions and 159 deletions
|
@ -66,8 +66,9 @@ class AnnotationEditorLayerBuilder {
|
|||
return;
|
||||
}
|
||||
|
||||
const clonedViewport = viewport.clone({ dontFlip: true });
|
||||
if (this.div) {
|
||||
this.annotationEditorLayer.update({ viewport: viewport.clone() });
|
||||
this.annotationEditorLayer.update({ viewport: clonedViewport });
|
||||
this.show();
|
||||
return;
|
||||
}
|
||||
|
@ -86,7 +87,7 @@ class AnnotationEditorLayerBuilder {
|
|||
});
|
||||
|
||||
const parameters = {
|
||||
viewport: viewport.clone(),
|
||||
viewport: clonedViewport,
|
||||
div: this.div,
|
||||
annotations: null,
|
||||
intent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue