Don't let link URL preview cover quote preview.
This commit is contained in:
parent
b07c215d62
commit
77142c23db
@ -341,9 +341,11 @@ UI = do ->
|
||||
o.workaround = (e) -> o.hoverend(e) unless root.contains e.target
|
||||
$.on doc, 'mousemove', o.workaround
|
||||
|
||||
hoverstart.padding = 25
|
||||
|
||||
hover = (e) ->
|
||||
@latestEvent = e
|
||||
height = @height or @el.offsetHeight
|
||||
height = (@height or @el.offsetHeight) + hoverstart.padding
|
||||
{clientX, clientY} = e
|
||||
|
||||
top = if @isImage
|
||||
|
||||
@ -46,9 +46,8 @@ ImageHover =
|
||||
el.play() if Conf['Autoplay']
|
||||
[width, height] = (+x for x in file.dimensions.split 'x')
|
||||
{left, right} = @getBoundingClientRect()
|
||||
padding = 25
|
||||
maxWidth = Math.max left, doc.clientWidth - right
|
||||
maxHeight = doc.clientHeight - padding
|
||||
maxHeight = doc.clientHeight - UI.hover.padding
|
||||
scale = Math.min 1, maxWidth / width, maxHeight / height
|
||||
el.style.maxWidth = "#{scale * width}px"
|
||||
el.style.maxHeight = "#{scale * height}px"
|
||||
@ -57,7 +56,7 @@ ImageHover =
|
||||
el: el
|
||||
latestEvent: e
|
||||
endEvents: 'mouseout click'
|
||||
height: scale * height + padding
|
||||
height: scale * height
|
||||
noRemove: true
|
||||
cb: ->
|
||||
$.off el, 'error', error
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user