mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c47a9692b1
commit
7d079aaea5
@ -364,17 +364,6 @@ def jump_to_anchor(name):
|
||||
scroll_to_elem(elem)
|
||||
|
||||
def scroll_to_elem(elem):
|
||||
# TODO: Re-enable this once you have added mathjax support
|
||||
# if window.mathjax?.math_present
|
||||
# # MathJax links to children of SVG tags and scrollIntoView doesn't
|
||||
# # work properly for them, so if this link points to something
|
||||
# # inside an <svg> tag we instead scroll the parent of the svg tag
|
||||
# # into view.
|
||||
# parent = elem
|
||||
# while parent and parent?.tagName?.toLowerCase() != 'svg'
|
||||
# parent = parent.parentNode
|
||||
# if parent?.tagName?.toLowerCase() == 'svg'
|
||||
# elem = parent.parentNode
|
||||
elem.scrollIntoView()
|
||||
if in_paged_mode:
|
||||
# Ensure we are scrolled to the column containing elem
|
||||
@ -426,11 +415,6 @@ def current_cfi():
|
||||
# The Conformal Fragment Identifier at the current position, returns
|
||||
# null if it could not be calculated.
|
||||
ans = None
|
||||
# TODO: uncomment after mathjax is implemented
|
||||
# if window.mathjax?.math_present and not window.mathjax?.math_loaded:
|
||||
# # If MathJax is loading, it is changing the DOM, so we cannot
|
||||
# # reliably generate a CFI
|
||||
# return ans
|
||||
if in_paged_mode:
|
||||
c = current_column_location()
|
||||
for x in c, c - col_and_gap, c + col_and_gap:
|
||||
|
Loading…
x
Reference in New Issue
Block a user