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:
Calixte Denizet 2022-06-23 15:47:45 +02:00
parent b5fea8ff14
commit 0c420f5135
13 changed files with 473 additions and 159 deletions

View file

@ -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,