This commit is contained in:
Kovid Goyal 2012-01-05 20:48:13 +05:30
parent 6c70624381
commit f12fc4c23e

View File

@ -76,7 +76,9 @@ viewport_to_document = (x, y, doc) -> # {{{
# We are in a frame
node = win.frameElement
rect = node.getBoundingClientRect()
return viewport_to_document(rect.left, rect.top, node.ownerDocument)
[vx, vy] = viewport_to_document(rect.left, rect.top, node.ownerDocument)
x += vx
y += vy
return [x, y]
# }}}