mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c3b015e75e
commit
63bac0b459
@ -110,6 +110,11 @@ def layout(is_single_page):
|
|||||||
cps = cps.landscape if window.innerWidth > window.innerHeight else cps.portrait
|
cps = cps.landscape if window.innerWidth > window.innerHeight else cps.portrait
|
||||||
if cps is 'auto':
|
if cps is 'auto':
|
||||||
cps = int(Math.floor(window.innerWidth / 500.0))
|
cps = int(Math.floor(window.innerWidth / 500.0))
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
cps = int(cps)
|
||||||
|
except:
|
||||||
|
cps = 1
|
||||||
cps = max(1, min(cps or 1, 20))
|
cps = max(1, min(cps or 1, 20))
|
||||||
if first_layout:
|
if first_layout:
|
||||||
handle_rtl_body(body_style)
|
handle_rtl_body(body_style)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user