Skip to content

Commit

Permalink
Append canvas to div#viewer instead of document
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditi-1400 committed Mar 4, 2024
1 parent dd3adc8 commit a305589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display/text_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down

0 comments on commit a305589

Please sign in to comment.