Fix IO mask position slightly off in edit mode (#3121)

This commit is contained in:
Abdo 2024-04-08 18:40:22 +03:00 committed by GitHub
parent 97efd49cd8
commit 642f29cf5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
});