From 642f29cf5e8b07a4bc829ae2bc57f2efe7503b47 Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 8 Apr 2024 18:40:22 +0300 Subject: [PATCH] Fix IO mask position slightly off in edit mode (#3121) --- ts/routes/image-occlusion/tools/from-shapes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/routes/image-occlusion/tools/from-shapes.ts b/ts/routes/image-occlusion/tools/from-shapes.ts index 943c688be..ab0a3f8b7 100644 --- a/ts/routes/image-occlusion/tools/from-shapes.ts +++ b/ts/routes/image-occlusion/tools/from-shapes.ts @@ -11,7 +11,7 @@ export const addShape = ( boundingBox: fabric.Rect, shape: Shape, ): void => { - const fabricShape = shape.toFabric(boundingBox.getBoundingRect()); + const fabricShape = shape.toFabric(boundingBox.getBoundingRect(true)); addBorder(fabricShape); if (fabricShape.type === "i-text") { enableUniformScaling(canvas, fabricShape); @@ -26,7 +26,7 @@ export const addShapeGroup = ( ): void => { const group = new fabric.Group(); shapes.map((shape) => { - const fabricShape = shape.toFabric(boundingBox.getBoundingRect()); + const fabricShape = shape.toFabric(boundingBox.getBoundingRect(true)); addBorder(fabricShape); group.addWithUpdate(fabricShape); });