fix pdf zoom

This commit is contained in:
j 2016-04-04 15:48:46 +02:00
parent 652df88342
commit e1967e96bc

View file

@ -42,15 +42,16 @@ function getVideoOverlay(page) {
video = links.filter(function(embed) { video = links.filter(function(embed) {
return embed.id == id; return embed.id == id;
})[0], })[0],
$interface, $playButton, $editButton; $interface, $playButton, $editButton,
pixelRatio = window.devicePixelRatio || 1;
if (editable || video) { if (editable || video) {
$interface = Ox.$('<div>') $interface = Ox.$('<div>')
.addClass('interface') .addClass('interface')
.css({ .css({
left: image.left + 'px', left: (image.left / pixelRatio) + 'px',
top: image.top + 'px', top: (image.top / pixelRatio) + 'px',
width: image.width + 'px', width: (image.width / pixelRatio) + 'px',
height: image.height + 'px' height: (image.height / pixelRatio) + 'px'
}); });
$playButton = Ox.$('<img>') $playButton = Ox.$('<img>')
.addClass('button playButton') .addClass('button playButton')