jviereck/pdfListView — pull request #1 by jpallen (2013-03-19 15:11:35+00:00)
Title: Add in modular loading, changing scale, reloading pdfs and text selection.

Hi Julian,

As part of integrating pdfListView into ShareLaTeX I've made some modifications to give it some essential features. Sorry for the large dump of commits, but with a young project I found myself moving quite fast and getting lots improved. Here's a run down of what I've done:

1) Added a wrapper function around the module so that it can be included via require.js, or CommonJS or directly as a script.
2) Added in a dedicated logger so that logging can be switch off in production.
3) Replaced the boot() method with a returned PDFListView object so that it can be embedded rather than just used as a demo.
4) Restructured how the ListView and RenderController are initialized so that a different PDF can be loaded into the same viewer.
5) Provided methods for `setScale(scale)`, `setToAutoScale`, `setToFit(Height|Width)`.
6) Stolen the text highlighting mechanism from the viewer that comes with PDF.js. I've not taken it all yet, since the parts to do with highlighting words for the search feature were unnecessary at the moment.

If you get a chance to look at any or all of this I'd really appreciate any feedback. I'm happy to change things if I've done things in a way that doesn't fit the project's goals or your style.