From 7fd6283d6f2648e45363a50215853ec357466243 Mon Sep 17 00:00:00 2001
From: notmasteryet <async.processingjs@yahoo.com>
Date: Thu, 22 Sep 2011 18:29:43 -0500
Subject: [PATCH] Fixing hyperlinks (regr. #509)

---
 web/viewer.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/viewer.js b/web/viewer.js
index 9d89c8801..89d83fe6b 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -280,8 +280,8 @@ var PageView = function(container, content, id, pageWidth, pageHeight,
     var links = content.getLinks();
     for (var i = 0; i < links.length; i++) {
       var link = document.createElement('a');
-      link.style.left = (Math.floor(links[i].x - this.x) * scale) + 'px';
-      link.style.top = (Math.floor(links[i].y - this.y) * scale) + 'px';
+      link.style.left = (Math.floor(links[i].x - view.x) * scale) + 'px';
+      link.style.top = (Math.floor(links[i].y - view.y) * scale) + 'px';
       link.style.width = Math.ceil(links[i].width * scale) + 'px';
       link.style.height = Math.ceil(links[i].height * scale) + 'px';
       link.href = links[i].url || '';