From 822c2b5b658a6d6beb39c53a24f7893f0bc0336a Mon Sep 17 00:00:00 2001
From: Yutao Yuan <yyt16384@gmail.com>
Date: Mon, 28 Mar 2016 19:11:19 +0800
Subject: [PATCH] Use the beginning position of links for hinting

---
 src/hints.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/hints.js b/src/hints.js
index 458d85c..ee3ddf3 100644
--- a/src/hints.js
+++ b/src/hints.js
@@ -90,8 +90,8 @@ Object.freeze((function(){
                 }
                 var rect = e.getBoundingClientRect();
                 if (!rect ||
-                    rect.top > offsets.bottom || rect.bottom < offsets.top ||
-                    rect.left > offsets.right || rect.right < offsets.left
+                    rect.top >= offsets.bottom || rect.bottom <= offsets.top ||
+                    rect.left >= offsets.right || rect.right <= offsets.left
                 ) {
                     return false;
                 }
@@ -137,7 +137,7 @@ Object.freeze((function(){
                 count++;
 
                 /* create the hint label with number */
-                rect  = e.getBoundingClientRect();
+                rect  = e.getClientRects()[0];
                 label = labelTmpl.cloneNode(false);
                 label.setAttribute(
                     "style", [
-- 
2.20.1