aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dom_utils.coffee
diff options
context:
space:
mode:
authormrmr19932014-12-18 10:33:09 +0000
committermrmr19932014-12-18 10:34:41 +0000
commit855e9a4e19ab0926f5531c37272f00a715f45ed8 (patch)
tree01734e579a279f29cb62cad6ece2f040843ae032 /lib/dom_utils.coffee
parent158b3f09fd222b0e93510dc17521833de73bcf88 (diff)
downloadvimium-855e9a4e19ab0926f5531c37272f00a715f45ed8.tar.bz2
Remove overlapping rects from link hints
Diffstat (limited to 'lib/dom_utils.coffee')
-rw-r--r--lib/dom_utils.coffee9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index aaa93923..7e19a7fc 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -114,13 +114,8 @@ DomUtils =
# something more sophisticated, but likely not worth the effort.
[x1, y1, x2, y2] = coords
- rect = @cropRectToVisible
- top: imgClientRect.top + y1
- left: imgClientRect.left + x1
- right: imgClientRect.left + x2
- bottom: imgClientRect.top + y2
- width: x2 - x1
- height: y2 - y1
+ rect = Utils.shiftRect (Utils.createRect x1, y1, x2, y2), imgClientRect.left, imgClientRect.top
+ rect = @cropRectToVisible rect
rects.push {element: area, rect: rect} unless not rect or isNaN rect.top
rects