Skip to content
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

Stop tracking the rotation in PDFViewerApplication and directly use PDFViewer.pagesRotation instead #8556

Merged
merged 1 commit into from
Jun 21, 2017
Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Part of the rotation handling code, in what's now web/app.js, hasn't really changed since before the viewer was split into multiple files/components.

Similar to other properties, such as current page/scale, we should probably avoid tracking state in multiple places. Hence I'm suggesting that we don't store the rotation in PDFViewerApplication, and access the value in PDFViewer instead.

Since PDFViewerApplication.pageRotation has existed for a very long time, a getter was added to avoid outright breaking third-party code that may depend on it.

… `PDFViewer.pagesRotation` instead

Part of the rotation handling code, in what's now `web/app.js`, hasn't really changed since before the viewer was split into multiple files/components.

Similar to other properties, such as current page/scale, we should probably avoid tracking state in multiple places. Hence I'm suggesting that we don't store the rotation in `PDFViewerApplication`, and access the value in `PDFViewer` instead.

Since `PDFViewerApplication.pageRotation` has existed for a very long time, a getter was added to avoid outright breaking third-party code that may depend on it.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/e15e264b3b46221/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/e15e264b3b46221/output.txt

Total script time: 2.31 mins

Published

@timvandermeij timvandermeij merged commit 36fb368 into mozilla:master Jun 21, 2017
@timvandermeij
Copy link
Contributor

Thank you for improving this!

@Snuffleupagus Snuffleupagus deleted the app-remove-pageRotation branch June 22, 2017 07:37
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…ation

Stop tracking the rotation in `PDFViewerApplication` and directly use `PDFViewer.pagesRotation` instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants