Merge pull request #515 from notmasteryet/tree-23

Fixing hyperlinks (regr. #509)
This commit is contained in:
vingtetun 2011-09-22 17:03:16 -07:00
commit b8c7030309

View File

@ -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 || '';