mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
5b147cd745
commit
db6059ca00
@ -474,10 +474,10 @@ class CanonicalFragmentIdentifier
|
|||||||
x = (point.a*rect.left + (1-point.a)*rect.right)
|
x = (point.a*rect.left + (1-point.a)*rect.right)
|
||||||
y = (rect.top + rect.bottom)/2
|
y = (rect.top + rect.bottom)/2
|
||||||
[x, y] = viewport_to_document(x, y, ndoc)
|
[x, y] = viewport_to_document(x, y, ndoc)
|
||||||
tn = if span.firstChild then span.firstChild.nodeValue else ''
|
|
||||||
tn = ndoc.createTextNode(tn)
|
|
||||||
p = span.parentNode
|
p = span.parentNode
|
||||||
p.insertBefore(tn, span)
|
for node in span.childNodes
|
||||||
|
span.removeChild(node)
|
||||||
|
p.insertBefore(node, span)
|
||||||
p.removeChild(span)
|
p.removeChild(span)
|
||||||
p.normalize()
|
p.normalize()
|
||||||
if callback
|
if callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user