From 34abd802674867fe5627a4f5061c80746286b557 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 16 Sep 2014 18:23:53 -0700 Subject: [PATCH] tweak image hover vertical position --- src/General/UI.coffee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 193bd471d..44eec8030 100755 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -341,13 +341,10 @@ UI = do -> height = @el.offsetHeight {clientX, clientY} = e - top = clientY - 120 - top = if @clientHeight <= height or top <= 0 - 0 - else if top + height >= @clientHeight - @clientHeight - height + top = if @isImage + Math.max 0, clientY * (@clientHeight - height) / @clientHeight else - top + Math.max 0, Math.min(@clientHeight - height, clientY - 120) threshold = @clientWidth / 2 threshold = Math.max threshold, @clientWidth - 400 unless @isImage