Fix foldable background layout
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user