Skip to content

Presentation Mode - Replaces #1388 #1938

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

Merged
merged 5 commits into from
Jul 31, 2012

Conversation

saebekassebil
Copy link
Contributor

Replacing #1388 with this take from scratch which works quite a lot better (probably due to all the contributions to the rendering code since last try.

This PR is essentially the same, with the same changes:

  • Presentation mode, means navigation per page - "Single Page Mode"
  • <spacebar> has been added as a "Next Page" key
  • A button has been added to the toolbar (But needs a fancy icon like the others).

Here, both Chrome and Firefox works pretty well with this solution, except a minor difference between the two of them: Firefox seems to handle padding and margin differently when using scrollIntoView - Therefore there is a minor visual difference. Firefox has no "padding" at the top of the window, when using fullscreen mode.

As last time: Fixes/Closes #1355 and #1083

@yurydelendik
Copy link
Contributor

/botio-linux lint
/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/8a6728cf927455c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_lint from @yurydelendik received. Current queue size: 0

Live output at: http://107.21.233.14:8877/654a1a88865534e/output.txt

@pdfjsbot
Copy link

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/654a1a88865534e/output.txt

Total script time: 1.22 mins

  • Lint: Passed

@yurydelendik
Copy link
Contributor

Thank you for doing that.

There is a strange artifact on the last page: previous page is partially visible.

A few notes/question:

  1. scroll bar is visible -- is it possible to hide make it semi-transparent it using CSS?
  2. tabindex has to be adjusted for the following buttons;
  3. add <span data-l10n-id="open_file_label" and string entries for the en-US locale files;
  4. in CSS, you can refer non-existent PNG icon file (or you can draw something yourself) -- icon will be landed separate from this pull later.

@yurydelendik
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/68588b53660ae0a/output.txt

@pdfjsbot
Copy link

@yurydelendik
Copy link
Contributor

(Image by shorlander: http://f.cl.ly/items/1i1y170M262l29090T1F/fullscreen.png)

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/d7e226640a9dc55/output.txt

@pdfjsbot
Copy link

@yurydelendik
Copy link
Contributor

Awesome! +1 from me

@brendandahl , could you take a peek as well?

@gigaherz
Copy link
Contributor

Nice. Any chance at being able to scroll pages with the mouse wheel? Maybe in a followup update?

Also, not sure if it's pdf.js or firefox, but it's VERY slow (~5 seconds) when switching to/from fullscreen here (Firefox 14 in Windows XP).

Nice work regardless.

@saebekassebil
Copy link
Contributor Author

@gigaherz Thanks. The mouse wheel stuff wouldn't be exactly what I've been aiming at, since this is more of a "presentation" mode / single page mode than a mere "fullscreen" mode. The reason for this is, that if you want to use the mouse wheel, you'll probably not be presenting anything, thus F11 / manual fullscreen migth be better suited?

Sounds weird about the slowness. Here it only take half a second or something like that. I don't think it's the implementation as it's super simple, and only calls the respective vendor provided methods for requesting fullscreen (document.mozRequestFullScreen)

@brendandahl
Copy link
Contributor

Works very nicely here. Thanks Jakob!

brendandahl added a commit that referenced this pull request Jul 31, 2012
@brendandahl brendandahl merged commit cc9ab10 into mozilla:master Jul 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add simple presentator mode to viewer
5 participants