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.
1 parent ea84455 commit 2b7075aCopy full SHA for 2b7075a
resources/webview_base.html
@@ -425,10 +425,14 @@
425
}
426
function computeSize() {
427
428
+ let forcedResolutions = [<!-- Forced Resolution -->];
429
+ let zoom = forcedResolutions[0] > 0 ? 1.0/window.devicePixelRatio : 1.0;
430
+ canvas.style.zoom = zoom;
431
+
432
// Compute forced aspect ratio and align canvas
433
resolution = forceAspectRatio(window.innerWidth, window.innerHeight);
- canvas.style.left = `${(window.innerWidth - resolution.x) / 2}px`;
- canvas.style.top = `${(window.innerHeight - resolution.y) / 2}px`;
434
+ canvas.style.left = `${(window.innerWidth - resolution.x*zoom) / 2}px`;
435
+ canvas.style.top = `${(window.innerHeight - resolution.y*zoom) / 2}px`;
436
437
for (let buffer of buffers) {
438
if (buffer.Target) {
0 commit comments