New: partial commit for horizontal scrolling

-dimAfterZoom setting no longer used

-Added "verticallyOriented" setting to determine which direction everything loads

-Also new: maxHeights, pageTopOffsets, totalWidth(s), widthLeftOfPages; all mirror opposite dimension

-Reorganized isHorizontallyInViewport to match order of isVerticallyInViewport

-Made "isPageVisible" work in both dimensions, added settings objects to make sure all data is available at all times

-adding code to loadPage() still in progress

-loadDocument() works in both directions with some if statements

-pulled other available data from json file that did not exist before

-making some temporary changes to diva.less to allow for this to work; may be reverted later
Fixed: added the one line that last commit needed

-Reverting CSS from last commit. Will make this happen in javascript as orientation changes.

-Adding one line to loadPage that makes pages load correctly.
New: initially visible pages load correctly

-Created "diva-page-vertical" and "-horizontal" separate CSS classes

-Added 'transform' CSS param to make page-horizontal vertically centered as 'margin: auto 0;' does not work.

-loadPage adds these classes

-added if/else on verticallyOriented in gotoPage to calculate dimensions differently
New: tiles load horizontally when scrolling slowly

-changed isTileVisible definition to get proper values

-fixed an extra space in a comment I happened to pass

-changed scroll listener to calculate both top and left scrolling all the time - may change this back next commit
New: pages load correctly and page index updates

-Added pageLeftOf/rightOfViewport functions to mirror Below/Above

-Added pageLeftOf/pageRightOf calls to attemptPageShow - completely if/else statements were not necessary as one and only one will show up true

-Changed comments/structure in adjustPages to allow for both orientations

-setCurrentPage now works in both orientations

-the scroll function I said I'd change back was changed back - direction = 0 here basically says that the non-primary scroll was moved.
Merge branch 'develop' of https://github.com/ddmal/diva.js into horiz-scrolling
Merge branch 'develop' of https://github.com/ddmal/diva.js into horiz-scrolling
Fixed: scrolling left works as intended now

-Fixed variable use in pageRightOfViewport (meant width, used height)

-Added checks in attemptPageHide to work in both dimensions

-Including some preliminary changes to handleZoom for next commit
Fixed: various small fixes to tests

Dealing with a messed-up rollback; this shouldn't be a duplicate commit somewhere.
Merge branch 'develop' of https://github.com/ddmal/diva.js into horiz-scrolling

Conflicts:
	source/js/diva.js
New: both horizontal zooming and vertical zoom work with the same points

Long story short is that this makes the non-primary widthLeftOfPages/heightAbovePages mirror pageTop/LeftOffsets, but I'll fix this in a later commit.

-Added pageBefore/AfterViewport functions that automatically determine which is correct to use

-gotoPageTop preps values for new implementation of gotoPage correctly

-gotoPage treats both dimensions as "primary" - values passed to gotoPage must be the amount of pixels into the page desired to be the centre of the Diva viewport.

-changed heightAbove/widthLeftOfPages as described in first line of message

-handleZoom matches above math as well

-moved x/y hashparam parsing to a different location so an if/else could be chained off it to prep the initial load correctly
Fixed: scrolling offset position is maintained when toggling between grid/fullscreen and regular view

-added spaces to meet DDMAL formatting

-vertical/horizontal offset is saved after every scroll event

-does not work in horizontal scrolling mode, however - will be fixed in later commit
Fixed: reverted last change; full screen mode toggling now retains scroll position

-settings.oldZoomLevel is now initialized in loadDocument - I wanted to do it earlier but it is used to see if this is the first page load

-reverted changes from last commit as they were only for a very specific use case. returning from grid view now returns to the left-most grid page regardless; added lines in 1194-1197 serve to make sure the page is top-justified rather than venter-justified.

-handleModeChange (fullscreen toggle) now saves position and loads it correctly into the fullscreen viewer; same for returning.
Fixed: toggling between grid to horizontal offset maintains display correctly

-top/leftScrollSoFar manually set in gotoRow to make sure isVerticallyInViewport is calculated correctly

-made settings.inGrid simulate verticallyOriented == true when verticallyOriented == false
Fixed: zoom bugs

-replaced most offset calculations by changing functionality of getYOffset/getXOffset

-added recalculation of left/topScrollSoFar to handleZoom so isInViewport functions are calculated correctly
Fixed: double-click zoom works again

-Removed preZoomOffset, added "doubleClickZoom" flag

-Moved new equivalent of documentScroll preZoomOffset functionality to the double-click listener

-double-click listener now calculates values as expected with new offset calculations

-rearranged handleZoom to work with doubleClickZoom setting
Merge branch 'develop' of https://github.com/ddmal/diva.js into horiz-scrolling

Conflicts:
	source/js/diva.js
Fixed: tests now use new horizontalOffset calculations

-Added checks for invalid zoom level and goDirectlyTo before page load

-Tests pass again.

-Included horizontal scrolling demo.
Merge branch 'develop' of https://github.com/ddmal/diva.js into horiz-scrolling
New: removed references to left/topScrollSoFar

-Removed top/leftScrollSoFar in favour of directly accessing variables from DOM.

-Optimized isTileLoaded

-Combined some code in adjustPages

-gotoPage has a safety for heightAbove/widthLeftOfPages being null

-Included some console.logs that will be removed next commit

-condensed documentScroll (three lines of code) into loadDocument

-added one last call to getX/YOffset