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

Include the state in the "presentationmodechanged" event, and remove the separate active/switchInProgress properties #12788

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Given that we already have a PresentationModeState-enumeration, we should use that with the "presentationmodechanged" event rather than including separate properties. Note that this new behaviour, of including an enumeration-value in the event, is consistent with lots of other existing viewer-events.

To hopefully avoid issues in custom implementations of the default viewer, any attempt to access the removed properties will now throw.

@timvandermeij
Copy link
Contributor

/botio-windows preview

@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/f2e18570b9fed79/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

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

Total script time: 4.14 mins

Published

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with these comments addressed.

web/pdf_presentation_mode.js Outdated Show resolved Hide resolved
web/pdf_presentation_mode.js Outdated Show resolved Hide resolved
…e the separate `active`/`switchInProgress` properties

Given that we already have a `PresentationModeState`-enumeration, we should use that with the "presentationmodechanged" event rather than including separate properties. Note that this new behaviour, of including an enumeration-value in the event, is consistent with lots of other existing viewer-events.

To hopefully avoid issues in custom implementations of the default viewer, any attempt to access the removed properties will now throw.
@Snuffleupagus Snuffleupagus force-pushed the presentationmodechanged-state branch from f3e31a7 to c185061 Compare December 28, 2020 19:31
@timvandermeij timvandermeij merged commit 3e34281 into mozilla:master Dec 28, 2020
@timvandermeij
Copy link
Contributor

Looks good!

@Snuffleupagus Snuffleupagus deleted the presentationmodechanged-state branch December 28, 2020 20:12
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