This commit is contained in:
Kovid Goyal 2016-09-25 13:35:44 +05:30
parent c3b015e75e
commit 63bac0b459

View File

@ -110,6 +110,11 @@ def layout(is_single_page):
cps = cps.landscape if window.innerWidth > window.innerHeight else cps.portrait
if cps is 'auto':
cps = int(Math.floor(window.innerWidth / 500.0))
else:
try:
cps = int(cps)
except:
cps = 1
cps = max(1, min(cps or 1, 20))
if first_layout:
handle_rtl_body(body_style)