set fullscreen padding to the proper width
This commit is contained in:
parent
be2439be65
commit
1da56e759f
@ -4,6 +4,7 @@ body, canvas, #padding {
|
||||
}
|
||||
|
||||
#padding {
|
||||
min-width: 100%;
|
||||
background: black;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const padding = document.getElementById("padding");
|
||||
let pdfDoc = null;
|
||||
let pageRendering = false;
|
||||
let renderPending = false;
|
||||
@ -54,6 +55,7 @@ function display(newCanvas) {
|
||||
canvas.width = newCanvas.width;
|
||||
canvas.style.height = newCanvas.style.height;
|
||||
canvas.style.width = newCanvas.style.width;
|
||||
padding.style.width = canvas.style.width;
|
||||
canvas.getContext("2d", { alpha: false }).drawImage(newCanvas, 0, 0);
|
||||
scrollTo(0, 0);
|
||||
}
|
||||
@ -190,7 +192,6 @@ function isTextSelected() {
|
||||
}
|
||||
|
||||
function updateInset() {
|
||||
const padding = document.getElementById("padding");
|
||||
const windowInsetTop = channel.getWindowInsetTop() / window.devicePixelRatio + "px";
|
||||
padding.style.paddingTop = windowInsetTop;
|
||||
textLayerDiv.style.top = windowInsetTop;
|
||||
|
Loading…
Reference in New Issue
Block a user