Well, that would explain the image preview jumping.

This commit is contained in:
ccd0 2014-09-16 17:47:24 -07:00
parent 26d6c8b6bf
commit 5e1b8a8f7c

View File

@ -310,6 +310,7 @@ UI = do ->
isImage: el.nodeName in ['IMG', 'VIDEO'] isImage: el.nodeName in ['IMG', 'VIDEO']
cb cb
endEvents endEvents
ready: false
latestEvent latestEvent
clientHeight: doc.clientHeight clientHeight: doc.clientHeight
clientWidth: doc.clientWidth clientWidth: doc.clientWidth
@ -321,6 +322,7 @@ UI = do ->
$.asap -> $.asap ->
!el.parentNode or asapTest() !el.parentNode or asapTest()
, -> , ->
o.ready = true
o.hover o.latestEvent if el.parentNode o.hover o.latestEvent if el.parentNode
$.on root, endEvents, o.hoverend $.on root, endEvents, o.hoverend
@ -335,6 +337,7 @@ UI = do ->
hover = (e) -> hover = (e) ->
@latestEvent = e @latestEvent = e
return unless @ready
height = @el.offsetHeight height = @el.offsetHeight
{clientX, clientY} = e {clientX, clientY} = e