disable horizontal scrollbars in fitWidth mode
This commit is contained in:
parent
4a2c42fa02
commit
4d6651818d
1 changed files with 5 additions and 1 deletions
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge two arrays. Any properties in b will replace the same properties in
|
* Merge two arrays. Any properties in b will replace the same properties in
|
||||||
* a. New properties from b will be added to a.
|
* a. New properties from b will be added to a.
|
||||||
|
@ -192,10 +194,12 @@ function ComicBook(id, srcs, opts) {
|
||||||
switch(options.zoomMode) {
|
switch(options.zoomMode) {
|
||||||
|
|
||||||
case "manual":
|
case "manual":
|
||||||
|
document.body.style.overflowX = "auto"
|
||||||
zoom_scale = (options.displayMode === "double") ? scale * 2 : scale;
|
zoom_scale = (options.displayMode === "double") ? scale * 2 : scale;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "fitWidth":
|
case "fitWidth":
|
||||||
|
document.body.style.overflowX = "hidden"
|
||||||
zoom_scale = (window.innerWidth > width) ? ((window.innerWidth - width) / window.innerWidth) + 1 // scale up if the window is wider than the page
|
zoom_scale = (window.innerWidth > width) ? ((window.innerWidth - width) / window.innerWidth) + 1 // scale up if the window is wider than the page
|
||||||
: window.innerWidth / width; // scale down if the window is narrower than the page
|
: window.innerWidth / width; // scale down if the window is narrower than the page
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue