Skip to content

Commit

Permalink
Fix TextLayer and AnnotationLayer rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Mar 31, 2023
1 parent ce1f3ac commit 5b4b596
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Page/AnnotationLayer.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
}
}

[data-main-rotation='90'] {
transform: rotate(90deg) translateY(-100%);
}
[data-main-rotation='180'] {
transform: rotate(180deg) translate(-100%, -100%);
}
[data-main-rotation='270'] {
transform: rotate(270deg) translateX(-100%);
}

.annotationLayer {
position: absolute;
top: 0;
Expand Down
10 changes: 10 additions & 0 deletions src/Page/TextLayer.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
}
}

[data-main-rotation='90'] {
transform: rotate(90deg) translateY(-100%);
}
[data-main-rotation='180'] {
transform: rotate(180deg) translate(-100%, -100%);
}
[data-main-rotation='270'] {
transform: rotate(270deg) translateX(-100%);
}

.textLayer {
position: absolute;
text-align: initial;
Expand Down

0 comments on commit 5b4b596

Please sign in to comment.