OS.js-extras
OS.js-extras copied to clipboard
pdfJS improvment
- 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
Cool!
Just a few comments:
- You can't use the
idHTML 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-canvaselement you can use - There's also a
gui-iframeelement 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 :)
https://os.js.org/doc/client/OSjs.API.html#.toggleFullscreen
:)
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.
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
});