mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: center align text when bind to container via context menu (#6451)
This commit is contained in:
parent
ca3be2c678
commit
6164b5273c
2 changed files with 14 additions and 1 deletions
|
@ -777,6 +777,13 @@ describe("textWysiwyg", () => {
|
|||
]);
|
||||
expect(text.containerId).toBe(rectangle.id);
|
||||
expect(text.verticalAlign).toBe(VERTICAL_ALIGN.MIDDLE);
|
||||
expect(text.textAlign).toBe(TEXT_ALIGN.CENTER);
|
||||
expect(text.x).toBe(
|
||||
h.elements[0].x + h.elements[0].width / 2 - text.width / 2,
|
||||
);
|
||||
expect(text.y).toBe(
|
||||
h.elements[0].y + h.elements[0].height / 2 - text.height / 2,
|
||||
);
|
||||
});
|
||||
|
||||
it("should update font family correctly on undo/redo by selecting bounded text when font family was updated", async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue