return {x: y, y: x};
}
},
- getLinks: function(scale) {
+ getLinks: function() {
var xref = this.xref;
var annotations = xref.fetchIfRef(this.annotations);
var i, n = annotations.length;
var bottomRightCorner = this.rotatePoint(rect[2], rect[3]);
var link = {};
- link.x = scale * Math.min(topLeftCorner.x, bottomRightCorner.x);
- link.y = scale * Math.min(topLeftCorner.y, bottomRightCorner.y);
- link.width = scale * Math.abs(topLeftCorner.x - bottomRightCorner.x);
- link.height = scale * Math.abs(topLeftCorner.y - bottomRightCorner.y);
+ link.x = Math.min(topLeftCorner.x, bottomRightCorner.x);
+ link.y = Math.min(topLeftCorner.y, bottomRightCorner.y);
+ link.width = Math.abs(topLeftCorner.x - bottomRightCorner.x);
+ link.height = Math.abs(topLeftCorner.y - bottomRightCorner.y);
var a = annotation.get("A");
if (a) {
switch(a.get("S").name) {
};
function setupLinks(canvas, content, scale) {
- var links = content.getLinks(scale);
+ var links = content.getLinks();
var currentLink = null;
if (links.length > 0)
{
x -= p.offsetLeft;
y -= p.offsetTop;
}
+ x /= scale;
+ y /= scale;
for (var i = 0; i < links.length; i++) {
var link = links[i];
if (!link.url)