mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Proper buffer for page and book modes (m2)
This commit is contained in:
parent
0c63f35de1
commit
fe2aa52caf
@ -1,8 +1,8 @@
|
||||
# To Do
|
||||
|
||||
* Make sure adjacent pages aren't visible
|
||||
* Thumbs hover and active state (SVG overlay?)
|
||||
* Resize on window resize
|
||||
* When going to thumbs, scroll to the proper part of the page
|
||||
* Show/hide pages?
|
||||
* Support 400+ page collections
|
||||
* Show/hide pages?
|
||||
* Play with constraints while zooming out on corners/edges?
|
||||
|
@ -330,11 +330,12 @@
|
||||
layoutConfig.sameWidth = true;
|
||||
} else if (this.mode === 'scroll') {
|
||||
layoutConfig.buffer = this.pageBuffer;
|
||||
} else if (this.mode === 'book') {
|
||||
layoutConfig.book = true;
|
||||
layoutConfig.buffer = this.bigBuffer;
|
||||
} else if (this.mode === 'page') {
|
||||
layoutConfig.buffer = 2;
|
||||
} else if (this.mode === 'book' || this.mode === 'page') {
|
||||
layoutConfig.book = (this.mode === 'book');
|
||||
var height = 1 + (this.pageBuffer * 2);
|
||||
// Note that using window here is approximate, but that's close enough.
|
||||
// We can't use viewer, because it may be stretched for the thumbs view.
|
||||
layoutConfig.buffer = (height * ($(window).width() / $(window).height())) / 2;
|
||||
}
|
||||
|
||||
var layout = {
|
||||
|
Loading…
Reference in New Issue
Block a user