tweak image hover vertical position
This commit is contained in:
parent
5e1b8a8f7c
commit
34abd80267
@ -341,13 +341,10 @@ UI = do ->
|
|||||||
height = @el.offsetHeight
|
height = @el.offsetHeight
|
||||||
{clientX, clientY} = e
|
{clientX, clientY} = e
|
||||||
|
|
||||||
top = clientY - 120
|
top = if @isImage
|
||||||
top = if @clientHeight <= height or top <= 0
|
Math.max 0, clientY * (@clientHeight - height) / @clientHeight
|
||||||
0
|
|
||||||
else if top + height >= @clientHeight
|
|
||||||
@clientHeight - height
|
|
||||||
else
|
else
|
||||||
top
|
Math.max 0, Math.min(@clientHeight - height, clientY - 120)
|
||||||
|
|
||||||
threshold = @clientWidth / 2
|
threshold = @clientWidth / 2
|
||||||
threshold = Math.max threshold, @clientWidth - 400 unless @isImage
|
threshold = Math.max threshold, @clientWidth - 400 unless @isImage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user