From 26d6c8b6bfc406126e9eb340b99f51fad58bdef4 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 16 Sep 2014 17:27:46 -0700 Subject: [PATCH] hover placement: only use the halfway threshold for images --- src/General/UI.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 60cc1db1e..02035d256 100755 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -307,6 +307,7 @@ UI = do -> root el style: el.style + isImage: el.nodeName in ['IMG', 'VIDEO'] cb endEvents latestEvent @@ -345,7 +346,9 @@ UI = do -> else 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] else [null, @clientWidth - clientX + 45 + 'px']