Skip to content

Commit 1da56e7

Browse files
committed
set fullscreen padding to the proper width
1 parent be2439b commit 1da56e7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/src/main/assets/viewer.css

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ body, canvas, #padding {
44
}
55

66
#padding {
7+
min-width: 100%;
78
background: black;
89
}
910

app/src/main/assets/viewer.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const padding = document.getElementById("padding");
34
let pdfDoc = null;
45
let pageRendering = false;
56
let renderPending = false;
@@ -54,6 +55,7 @@ function display(newCanvas) {
5455
canvas.width = newCanvas.width;
5556
canvas.style.height = newCanvas.style.height;
5657
canvas.style.width = newCanvas.style.width;
58+
padding.style.width = canvas.style.width;
5759
canvas.getContext("2d", { alpha: false }).drawImage(newCanvas, 0, 0);
5860
scrollTo(0, 0);
5961
}
@@ -190,7 +192,6 @@ function isTextSelected() {
190192
}
191193

192194
function updateInset() {
193-
const padding = document.getElementById("padding");
194195
const windowInsetTop = channel.getWindowInsetTop() / window.devicePixelRatio + "px";
195196
padding.style.paddingTop = windowInsetTop;
196197
textLayerDiv.style.top = windowInsetTop;

0 commit comments

Comments
 (0)