hover placement: only use the halfway threshold for images
This commit is contained in:
parent
2144430d71
commit
26d6c8b6bf
@ -307,6 +307,7 @@ UI = do ->
|
|||||||
root
|
root
|
||||||
el
|
el
|
||||||
style: el.style
|
style: el.style
|
||||||
|
isImage: el.nodeName in ['IMG', 'VIDEO']
|
||||||
cb
|
cb
|
||||||
endEvents
|
endEvents
|
||||||
latestEvent
|
latestEvent
|
||||||
@ -345,7 +346,9 @@ UI = do ->
|
|||||||
else
|
else
|
||||||
top
|
top
|
||||||
|
|
||||||
[left, right] = if clientX <= @clientWidth / 2
|
threshold = @clientWidth / 2
|
||||||
|
threshold = Math.max threshold, @clientWidth - 400 unless @isImage
|
||||||
|
[left, right] = if clientX <= threshold
|
||||||
[clientX + 45 + 'px', null]
|
[clientX + 45 + 'px', null]
|
||||||
else
|
else
|
||||||
[null, @clientWidth - clientX + 45 + 'px']
|
[null, @clientWidth - clientX + 45 + 'px']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user