aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
authorPhil Crosby2011-07-29 23:49:25 -0700
committerPhil Crosby2011-07-29 23:49:25 -0700
commitdc114c168740212670021ec39a097371bd35b3ed (patch)
treecd59aac7dff5b080d07ec41d26237b5db35bc1e7 /linkHints.js
parent9a7a2eff94d67aac307c6e20ec90270165ef05b2 (diff)
downloadvimium-dc114c168740212670021ec39a097371bd35b3ed.tar.bz2
Remove the zooming functionality. It conflict's with Chrome's native zooming and doesn't work as well.
Now that Chrome saves your zoom settings, there's no need for our own zoom implementation. This also fixes #370.
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/linkHints.js b/linkHints.js
index f4ffc768..91e77410 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -153,10 +153,10 @@ var linkHints = {
* Returns true if element is visible.
*/
isVisible: function(element, clientRect) {
- // Exclude links which have just a few pixels on screen, because the link hints won't show for them anyway.
- var zoomFactor = currentZoomLevel / 100.0;
- if (!clientRect || clientRect.top < 0 || clientRect.top * zoomFactor >= window.innerHeight - 4 ||
- clientRect.left < 0 || clientRect.left * zoomFactor >= window.innerWidth - 4)
+ // Exclude links which have just a few pixels on screen, because the link hints won't show for them
+ // anyway.
+ if (!clientRect || clientRect.top < 0 || clientRect.top >= window.innerHeight - 4 ||
+ clientRect.left < 0 || clientRect.left >= window.innerWidth - 4)
return false;
if (clientRect.width < 3 || clientRect.height < 3)
@@ -575,11 +575,8 @@ var hintUtils = {
marker.clickableItem = link.element;
var clientRect = link.rect;
- // The coordinates given by the window do not have the zoom factor included since the zoom is set only on
- // the document node.
- var zoomFactor = currentZoomLevel / 100.0;
- marker.style.left = clientRect.left + window.scrollX / zoomFactor + "px";
- marker.style.top = clientRect.top + window.scrollY / zoomFactor + "px";
+ marker.style.left = clientRect.left + window.scrollX + "px";
+ marker.style.top = clientRect.top + window.scrollY + "px";
return marker;
}