Fix foldable background layout
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-24 10:41:24 +01:00
parent b11f010938
commit ce43cac145
4 changed files with 201 additions and 48 deletions

View File

@@ -15,8 +15,10 @@ export async function withFabricCanvas<T>(
handler: (canvas: fabric.Canvas, element: HTMLCanvasElement) => Promise<T>,
): Promise<T> {
const canvasElement = document.createElement('canvas');
canvasElement.width = CANVAS_WIDTH;
canvasElement.height = CANVAS_HEIGHT;
const targetWidth = options.canvasWidth ?? CANVAS_WIDTH;
const targetHeight = options.canvasHeight ?? CANVAS_HEIGHT;
canvasElement.width = targetWidth;
canvasElement.height = targetHeight;
const canvas = new fabric.Canvas(canvasElement, {
selection: false,