-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move rotation normalization from PDFViewerApplication
and into BaseViewer
#13155
Move rotation normalization from PDFViewerApplication
and into BaseViewer
#13155
Conversation
…eViewer` The rotation handling that's currently living in `PDFViewerApplication` is *very* old, and pre-dates the introduction of the viewer components by years. As can be seen in the `BaseViewer.pagesRotation` setter, we're not actually normalizing the rotation as intended and instead rely on the caller to handle that correctly. This is first of all inconsistent, given how other setters are implemented, and secondly it could also lead to the rotation being set to a value outside of the `[0, 360)`-range. Finally, for improved consistency the rotation handling in `PageViewport` is updated similarly. Please note that this case, it's *not* changing the pre-existing logic.
246be15
to
19c2dfb
Compare
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/a526f4013087dbe/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/346f1ca66fa3cfa/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/a526f4013087dbe/output.txt Total script time: 3.75 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/346f1ca66fa3cfa/output.txt Total script time: 5.31 mins
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/a60baf954af4d2a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/a60baf954af4d2a/output.txt Total script time: 4.33 mins Published |
Nice find; thanks! |
The rotation handling that's currently living in
PDFViewerApplication
is very old, and pre-dates the introduction of the viewer components by years.As can be seen in the
BaseViewer.pagesRotation
setter, we're not actually normalizing the rotation as intended and instead rely on the caller to handle that correctly. This is first of all inconsistent, given how other setters are implemented, and secondly it could also lead to the rotation being set to a value outside of the[0, 360)
-range.Finally, for improved consistency the rotation handling in
PageViewport
is updated similarly. Please note that this case, it's not changing the pre-existing logic.