From 393da1e0331016d0513666d2f9a3e3f9d2bf9244 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Wed, 11 May 2016 17:12:31 +0200 Subject: [PATCH] Fix arithmetic mistakes in `isInsideViewport` --- extension/lib/viewport.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/lib/viewport.coffee b/extension/lib/viewport.coffee index 94d6f7c..f2ff7ab 100644 --- a/extension/lib/viewport.coffee +++ b/extension/lib/viewport.coffee @@ -261,9 +261,9 @@ getWindowViewport = (window) -> isInsideViewport = (rect, viewport) -> return \ rect.left <= viewport.right - MINIMUM_EDGE_DISTANCE and - rect.top <= viewport.bottom + MINIMUM_EDGE_DISTANCE and + rect.top <= viewport.bottom - MINIMUM_EDGE_DISTANCE and rect.right >= viewport.left + MINIMUM_EDGE_DISTANCE and - rect.bottom >= viewport.top - MINIMUM_EDGE_DISTANCE + rect.bottom >= viewport.top + MINIMUM_EDGE_DISTANCE scroll = (element, args) -> {method, type, directions, amounts, properties, adjustment, smooth} = args -- 2.39.3