mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: center align text when wrapped in container via context menu (#6480)
* rename action to wrapTextInContainer * fix: center align text when wrapped in container via context menu * revert translation key * fix tests
This commit is contained in:
parent
4d0d844e39
commit
979312f779
6 changed files with 14 additions and 13 deletions
|
@ -196,8 +196,8 @@ const pushContainerBelowText = (
|
|||
return updatedElements;
|
||||
};
|
||||
|
||||
export const actionCreateContainerFromText = register({
|
||||
name: "createContainerFromText",
|
||||
export const actionWrapTextInContainer = register({
|
||||
name: "wrapTextInContainer",
|
||||
contextItemLabel: "labels.createContainerFromText",
|
||||
trackEvent: { category: "element" },
|
||||
predicate: (elements, appState) => {
|
||||
|
@ -286,6 +286,7 @@ export const actionCreateContainerFromText = register({
|
|||
containerId: container.id,
|
||||
verticalAlign: VERTICAL_ALIGN.MIDDLE,
|
||||
boundElements: null,
|
||||
textAlign: TEXT_ALIGN.CENTER,
|
||||
},
|
||||
false,
|
||||
);
|
||||
|
|
|
@ -115,7 +115,7 @@ export type ActionName =
|
|||
| "toggleLinearEditor"
|
||||
| "toggleEraserTool"
|
||||
| "toggleHandTool"
|
||||
| "createContainerFromText";
|
||||
| "wrapTextInContainer";
|
||||
|
||||
export type PanelComponentProps = {
|
||||
elements: readonly ExcalidrawElement[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue