We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 233f9f4 + 2b7075a commit c30887bCopy full SHA for c30887b
resources/webview_base.html
@@ -431,10 +431,14 @@
431
}
432
function computeSize() {
433
434
+ let forcedResolutions = [<!-- Forced Resolution -->];
435
+ let zoom = forcedResolutions[0] > 0 ? 1.0/window.devicePixelRatio : 1.0;
436
+ canvas.style.zoom = zoom;
437
+
438
// Compute forced aspect ratio and align canvas
439
resolution = forceAspectRatio(window.innerWidth, window.innerHeight);
- canvas.style.left = `${(window.innerWidth - resolution.x) / 2}px`;
- canvas.style.top = `${(window.innerHeight - resolution.y) / 2}px`;
440
+ canvas.style.left = `${(window.innerWidth - resolution.x*zoom) / 2}px`;
441
+ canvas.style.top = `${(window.innerHeight - resolution.y*zoom) / 2}px`;
442
443
for (let buffer of buffers) {
444
if (buffer.Target) {
0 commit comments