Append canvas to div#viewer instead of document

This commit is contained in:
Aditi 2024-03-04 21:55:41 +05:30
parent dd3adc84db
commit a305589ebd

View File

@ -77,7 +77,7 @@ function getCtx() {
// OffscreenCanvas.
const canvas = document.createElement("canvas");
canvas.className = "hiddenCanvasElement";
document.body.append(canvas);
document.querySelector("#viewer").append(canvas);
_canvasContext = canvas.getContext("2d", { alpha: false });
}