Proper buffer for page and book modes (m2)

This commit is contained in:
Ian Gilman 2015-01-14 15:09:48 -08:00
parent 0c63f35de1
commit fe2aa52caf
2 changed files with 8 additions and 7 deletions

View File

@ -1,8 +1,8 @@
# To Do # To Do
* Make sure adjacent pages aren't visible
* Thumbs hover and active state (SVG overlay?) * Thumbs hover and active state (SVG overlay?)
* Resize on window resize * Resize on window resize
* When going to thumbs, scroll to the proper part of the page * When going to thumbs, scroll to the proper part of the page
* Show/hide pages?
* Support 400+ page collections * Support 400+ page collections
* Show/hide pages?
* Play with constraints while zooming out on corners/edges?

View File

@ -330,11 +330,12 @@
layoutConfig.sameWidth = true; layoutConfig.sameWidth = true;
} else if (this.mode === 'scroll') { } else if (this.mode === 'scroll') {
layoutConfig.buffer = this.pageBuffer; layoutConfig.buffer = this.pageBuffer;
} else if (this.mode === 'book') { } else if (this.mode === 'book' || this.mode === 'page') {
layoutConfig.book = true; layoutConfig.book = (this.mode === 'book');
layoutConfig.buffer = this.bigBuffer; var height = 1 + (this.pageBuffer * 2);
} else if (this.mode === 'page') { // Note that using window here is approximate, but that's close enough.
layoutConfig.buffer = 2; // We can't use viewer, because it may be stretched for the thumbs view.
layoutConfig.buffer = (height * ($(window).width() / $(window).height())) / 2;
} }
var layout = { var layout = {