josephernest / bigpicture.js

bigpicture.js is a Javascript library that allows infinite panning and infinite zooming in HTML pages.
https://josephernest.github.io/bigpicture.js/index.html
MIT License
809 stars 58 forks source link

Some love #2

Closed romainneutron closed 9 years ago

romainneutron commented 9 years ago

Hello,

I've just linted the JS, declared variables. Not tested, but it should be okay :)

josephernest commented 9 years ago

Thanks @romainneutron for this JS cleanup! Just something on old line 253 / new line 259 : the variable query has to have wider scope than current call of window.onkeydown because it may be reused on oldline260/newline266. Should we define this variable after newline24, so that it can be reused during multiple calls of window.onkeydown?

Something else (for my personal JS culture) : I have seen this sometimes : (function (window, $){ ...}) (window, jQuery); instead of (function (){ ... }) ();, what's the idea behind this ?

josephernest commented 9 years ago

I added (manually, because I don't really know how merging works! shame on me!) some of your modifications, thanks a lot!