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
|
o.workaround = (e) -> o.hoverend(e) unless root.contains e.target
|
||||||
$.on doc, 'mousemove', o.workaround
|
$.on doc, 'mousemove', o.workaround
|
||||||
|
|
||||||
|
hoverstart.padding = 25
|
||||||
|
|
||||||
hover = (e) ->
|
hover = (e) ->
|
||||||
@latestEvent = e
|
@latestEvent = e
|
||||||
height = @height or @el.offsetHeight
|
height = (@height or @el.offsetHeight) + hoverstart.padding
|
||||||
{clientX, clientY} = e
|
{clientX, clientY} = e
|
||||||
|
|
||||||
top = if @isImage
|
top = if @isImage
|
||||||
|
|||||||
@ -46,9 +46,8 @@ ImageHover =
|
|||||||
el.play() if Conf['Autoplay']
|
el.play() if Conf['Autoplay']
|
||||||
[width, height] = (+x for x in file.dimensions.split 'x')
|
[width, height] = (+x for x in file.dimensions.split 'x')
|
||||||
{left, right} = @getBoundingClientRect()
|
{left, right} = @getBoundingClientRect()
|
||||||
padding = 25
|
|
||||||
maxWidth = Math.max left, doc.clientWidth - right
|
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
|
scale = Math.min 1, maxWidth / width, maxHeight / height
|
||||||
el.style.maxWidth = "#{scale * width}px"
|
el.style.maxWidth = "#{scale * width}px"
|
||||||
el.style.maxHeight = "#{scale * height}px"
|
el.style.maxHeight = "#{scale * height}px"
|
||||||
@ -57,7 +56,7 @@ ImageHover =
|
|||||||
el: el
|
el: el
|
||||||
latestEvent: e
|
latestEvent: e
|
||||||
endEvents: 'mouseout click'
|
endEvents: 'mouseout click'
|
||||||
height: scale * height + padding
|
height: scale * height
|
||||||
noRemove: true
|
noRemove: true
|
||||||
cb: ->
|
cb: ->
|
||||||
$.off el, 'error', error
|
$.off el, 'error', error
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user