Debugging window/viewport scaling issues

This commit is contained in:
Danny McGee
2024-04-04 15:47:16 -04:00
parent 691ff92d17
commit 1efa6a95a1
4 changed files with 79 additions and 42 deletions
+2 -1
View File
@@ -64,7 +64,7 @@ export class StudioElement extends LitElement {
#onResize(): void {
const { width, height } = this.getBoundingClientRect();
studio.resize(new ViewportSize(width, height));
studio.resize(new ViewportSize(width, height), window.devicePixelRatio);
this.dispatchEvent(new CustomEvent("viewport-resized", {
detail: { width, height },
@@ -83,6 +83,7 @@ export class StudioElement extends LitElement {
canvasSelector: `#${this._canvasProvider?.canvasId}`,
canvasAlt: "Storyteller Studio",
viewportSize: new ViewportSize(width, height),
scaleFactor: window.devicePixelRatio,
};
try {