Closed 8Observer8 closed 11 months ago
Hey, if I remember correctly, there's some subtle trickery going on in the preview. It's an iframe nested within another controller iframe. I believe that the nested iframe gets resized to fit the container given that the space allocated to that controlling iframe is unknown a priori.
The following code in your plunk is probably responsible:
// Ensure canvas is resized when window changes size
window.addEventListener("resize", () => app.resizeCanvas());
I commented it out and the issue was fixed. Thank you very much!
// Ensure canvas is resized when window changes size
// window.addEventListener("resize", () => app.resizeCanvas());
The requested size of canvas is 300x300 but it is bigger in Preview: https://plnkr.co/edit/nEchdgd1UQYDClR1?preview