From e1967e96bcb0aecb9ee93b3e95cf4c78999856cc Mon Sep 17 00:00:00 2001 From: j Date: Mon, 4 Apr 2016 15:48:46 +0200 Subject: [PATCH] fix pdf zoom --- static/pdf.js/embeds.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/static/pdf.js/embeds.js b/static/pdf.js/embeds.js index fbdd308d..d6e52d06 100644 --- a/static/pdf.js/embeds.js +++ b/static/pdf.js/embeds.js @@ -42,15 +42,16 @@ function getVideoOverlay(page) { video = links.filter(function(embed) { return embed.id == id; })[0], - $interface, $playButton, $editButton; + $interface, $playButton, $editButton, + pixelRatio = window.devicePixelRatio || 1; if (editable || video) { $interface = Ox.$('
') .addClass('interface') .css({ - left: image.left + 'px', - top: image.top + 'px', - width: image.width + 'px', - height: image.height + 'px' + left: (image.left / pixelRatio) + 'px', + top: (image.top / pixelRatio) + 'px', + width: (image.width / pixelRatio) + 'px', + height: (image.height / pixelRatio) + 'px' }); $playButton = Ox.$('') .addClass('button playButton')