Skip to content
This repository was archived by the owner on Apr 24, 2018. It is now read-only.

pdfJS improvment#2

Open
h4mit wants to merge 5 commits intoos-js:masterfrom
h4mit:master
Open

pdfJS improvment#2
h4mit wants to merge 5 commits intoos-js:masterfrom
h4mit:master

Conversation

@h4mit
Copy link

@h4mit h4mit commented Jul 18, 2016

  • first page / last page buttons added
  • print button added
  • presentation mode button added
  • change page with mouse scroll wheel added
  • change page with input number

@andersevenrud
Copy link
Member

Cool!

Just a few comments:

  • You can't use the id HTML property as this will not work when you have multiple similar windows open. The DOM spec only allows one unique ID. Use classNames instead, or like it was before the change: Create the element programatically.
  • There's a gui-canvas element you can use
  • There's also a gui-iframe element you can use
  • You left an extra whitespace in the first line of scheme.html

Also, in my next commit I'm adding a internal fullscreen API, so you don't have to use a third-party one when that is done :)

@andersevenrud
Copy link
Member

@andersevenrud
Copy link
Member

Btw: You really should make a custom branch when making commits to official repositories. It's the only way to prevent problems if I decide to add something to your contribution.

@andersevenrud
Copy link
Member

Also, you can use this to implement mousewheel now:

Utils.$bind(element, 'mousewheel', function(ev, pos) {

  console.log(pos.z); // '-1' or '1' depending on direction

});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants