IO: Prevent text masks from flipping (#3672)

* Lock scaling flip when creating new text mask

* Lock scaling flip on existing text masks
This commit is contained in:
Ben Nguyen 2025-01-07 04:43:28 -08:00 committed by GitHub
parent 4ee6dacaa3
commit d89e6f3bdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -48,6 +48,7 @@ export class Text extends Shape {
backgroundColor: TEXT_BACKGROUND_COLOR, backgroundColor: TEXT_BACKGROUND_COLOR,
padding: TEXT_PADDING, padding: TEXT_PADDING,
lineHeight: 1, lineHeight: 1,
lockScalingFlip: true,
}); });
} }

View file

@ -46,6 +46,7 @@ export const drawText = (canvas: fabric.Canvas, onActivated: Callback): void =>
padding: TEXT_PADDING, padding: TEXT_PADDING,
opacity: get(opacityStateStore) ? 0.4 : 1, opacity: get(opacityStateStore) ? 0.4 : 1,
lineHeight: 1, lineHeight: 1,
lockScalingFlip: true,
}); });
text["id"] = "text-" + new Date().getTime(); text["id"] = "text-" + new Date().getTime();