mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Scroll notifications for scrolling in paged mode on Safari
This commit is contained in:
parent
ba1341f5d4
commit
02b66f2be4
@ -65,12 +65,15 @@ if is_ios:
|
||||
paged_viewport_scroll_to = def (x, y):
|
||||
if x is 0:
|
||||
document.documentElement.style.transform = 'none'
|
||||
return
|
||||
else:
|
||||
x *= -1
|
||||
document.documentElement.style.transform = f'translateX({x}px)'
|
||||
boss = get_boss()
|
||||
if boss:
|
||||
boss.onscroll()
|
||||
paged_viewport_x = def():
|
||||
raw = document.documentElement.style.transform
|
||||
if not raw:
|
||||
if not raw or raw is 'none':
|
||||
return 0
|
||||
raw = raw[12:]
|
||||
ans = parseInt(raw)
|
||||
|
Loading…
x
Reference in New Issue
Block a user