fix: respect text align when wrapping in a container (#6310)

* fix: respect text align when wrapping in a container

* fix
This commit is contained in:
Aakansha Doshi 2023-03-03 18:07:26 +05:30 committed by GitHub
parent 9f9666110e
commit 5c0b15ce2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 14 deletions

View file

@ -1,9 +1,4 @@
import {
BOUND_TEXT_PADDING,
ROUNDNESS,
TEXT_ALIGN,
VERTICAL_ALIGN,
} from "../constants";
import { BOUND_TEXT_PADDING, ROUNDNESS, VERTICAL_ALIGN } from "../constants";
import { getNonDeletedElements, isTextElement, newElement } from "../element";
import { mutateElement } from "../element/mutateElement";
import {
@ -259,7 +254,6 @@ export const actionCreateContainerFromText = register({
mutateElement(textElement, {
containerId: container.id,
verticalAlign: VERTICAL_ALIGN.MIDDLE,
textAlign: TEXT_ALIGN.CENTER,
boundElements: null,
});
redrawTextBoundingBox(textElement, container);