mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +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
|
@ -20,14 +20,23 @@
|
|||
--freetext-padding: 2px;
|
||||
}
|
||||
|
||||
[data-editor-rotation="90"] {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
[data-editor-rotation="180"] {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
[data-editor-rotation="270"] {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
.annotationEditorLayer {
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
font-size: calc(100px * var(--scale-factor));
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
.annotationEditorLayer .freeTextEditor {
|
||||
|
@ -38,6 +47,7 @@
|
|||
resize: none;
|
||||
width: auto;
|
||||
height: auto;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
.annotationEditorLayer .freeTextEditor .internal {
|
||||
|
@ -100,6 +110,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
.annotationEditorLayer .background {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue