webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 421 forks source link

zoom in and zoom out is not working #12

Closed npapastefanakis closed 10 years ago

npapastefanakis commented 10 years ago

i am trying to add in index.html the zoom in and zoom out button.

The code is:

<button id = "zoomIn" class = "toolbarButton zoomIn" title = "zoomIn"></button> <button id = "zoomOut" class = "toolbarButton zoomOut" title = "zoomOut"></button>

It doesn't work.

Thanks

npapastefanakis commented 10 years ago

The viewer.js has a document.getElementById("download") in it. If we delete the element the script crashes and this is the reason it is not working.

Before add the event listener to the toolbar, I suggest to check if the element exists in the DOM. This way we can remove / add whatever button we need to show.

Kind regards (this was not an issue)

Nice work guys

ghost commented 10 years ago

How can I remove the download button ?

adityab commented 10 years ago

Hello!

If you wish to remove the download button from your copy of ViewerJS, you could simply add extra CSS to hide the element with ID "download".