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

[Editor] Take into account the initial rotation (issue #16278)

This commit is contained in:
Calixte Denizet 2023-04-16 21:36:26 +02:00
parent 92baf14531
commit 8e5f4c0622
4 changed files with 53 additions and 3 deletions

View file

@ -74,6 +74,8 @@ class AnnotationEditor {
} = this.parent.viewport;
this.rotation = rotation;
this.pageRotation =
(360 + rotation - this._uiManager.viewParameters.rotation) % 360;
this.pageDimensions = [pageWidth, pageHeight];
this.pageTranslation = [pageX, pageY];
@ -250,7 +252,7 @@ class AnnotationEditor {
}
get parentRotation() {
return this._uiManager.viewParameters.rotation;
return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;
}
get parentDimensions() {