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
|
@ -121,7 +121,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"contextItemLabel": "labels.createContainerFromText",
|
||||
"name": "createContainerFromText",
|
||||
"name": "wrapTextInContainer",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
|
@ -4518,7 +4518,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"contextItemLabel": "labels.createContainerFromText",
|
||||
"name": "createContainerFromText",
|
||||
"name": "wrapTextInContainer",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
|
@ -5068,7 +5068,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"contextItemLabel": "labels.createContainerFromText",
|
||||
"name": "createContainerFromText",
|
||||
"name": "wrapTextInContainer",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
|
@ -5917,7 +5917,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"contextItemLabel": "labels.createContainerFromText",
|
||||
"name": "createContainerFromText",
|
||||
"name": "wrapTextInContainer",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
|
@ -6263,7 +6263,7 @@ Object {
|
|||
},
|
||||
Object {
|
||||
"contextItemLabel": "labels.createContainerFromText",
|
||||
"name": "createContainerFromText",
|
||||
"name": "wrapTextInContainer",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { UI, Pointer, Keyboard } from "./helpers/ui";
|
|||
import { getTransformHandles } from "../element/transformHandles";
|
||||
import { API } from "./helpers/api";
|
||||
import { KEYS } from "../keys";
|
||||
import { actionCreateContainerFromText } from "../actions/actionBoundText";
|
||||
import { actionWrapTextInContainer } from "../actions/actionBoundText";
|
||||
|
||||
const { h } = window;
|
||||
|
||||
|
@ -277,7 +277,7 @@ describe("element binding", () => {
|
|||
|
||||
expect(h.state.selectedElementIds[text1.id]).toBe(true);
|
||||
|
||||
h.app.actionManager.executeAction(actionCreateContainerFromText);
|
||||
h.app.actionManager.executeAction(actionWrapTextInContainer);
|
||||
|
||||
// new text container will be placed before the text element
|
||||
const container = h.elements.at(-2)!;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue