Get rid of $.asap in UI.hover.

This commit is contained in:
ccd0 2015-12-12 14:50:47 -08:00
parent 0546e439ea
commit b07c215d62
3 changed files with 4 additions and 6 deletions

View File

@ -310,7 +310,7 @@ UI = do ->
$.off d, 'mouseup', @up
$.set "#{@id}.position", @style.cssText
hoverstart = ({root, el, latestEvent, endEvents, asapTest, height, cb, noRemove}) ->
hoverstart = ({root, el, latestEvent, endEvents, height, cb, noRemove}) ->
o = {
root
el
@ -327,10 +327,10 @@ UI = do ->
o.hover = hover.bind o
o.hoverend = hoverend.bind o
$.asap ->
!el.parentNode or asapTest()
, ->
o.hover o.latestEvent
new MutationObserver(->
o.hover o.latestEvent if el.parentNode
).observe el, {childList: true}
$.on root, endEvents, o.hoverend
if $.x 'ancestor::div[contains(@class,"inline")][1]', root

View File

@ -57,7 +57,6 @@ ImageHover =
el: el
latestEvent: e
endEvents: 'mouseout click'
asapTest: -> true
height: scale * height + padding
noRemove: true
cb: ->

View File

@ -32,7 +32,6 @@ QuotePreview =
latestEvent: e
endEvents: 'mouseout click'
cb: QuotePreview.mouseout
asapTest: -> qp.firstElementChild
return unless origin = g.posts["#{boardID}.#{postID}"]