mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-25 18:31:15 +02:00
fix: bound text rotation across alignments (#9914)
Co-authored-by: A-Mundanilkunathil <aaronchackom2002@gmail.com>
This commit is contained in:

committed by
GitHub

parent
3085f4af81
commit
ae89608985
@@ -4886,8 +4886,8 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
|
||||
"version": 6,
|
||||
"verticalAlign": "top",
|
||||
"width": 80,
|
||||
"x": 205,
|
||||
"y": 205,
|
||||
"x": "241.29526",
|
||||
"y": "247.59241",
|
||||
}
|
||||
`;
|
||||
|
||||
|
@@ -4354,8 +4354,8 @@ describe("history", () => {
|
||||
expect.objectContaining({
|
||||
...textProps,
|
||||
// text element got redrawn!
|
||||
x: 205,
|
||||
y: 205,
|
||||
x: 241.295259647664,
|
||||
y: 247.59240920619527,
|
||||
angle: 90,
|
||||
id: text.id,
|
||||
containerId: container.id,
|
||||
@@ -4398,8 +4398,8 @@ describe("history", () => {
|
||||
}),
|
||||
expect.objectContaining({
|
||||
...textProps,
|
||||
x: 205,
|
||||
y: 205,
|
||||
x: 241.295259647664,
|
||||
y: 247.59240920619527,
|
||||
angle: 90,
|
||||
id: text.id,
|
||||
containerId: container.id,
|
||||
|
@@ -215,11 +215,12 @@ export const textWysiwyg = ({
|
||||
);
|
||||
app.scene.mutateElement(container, { height: targetContainerHeight });
|
||||
} else {
|
||||
const { y } = computeBoundTextPosition(
|
||||
const { x, y } = computeBoundTextPosition(
|
||||
container,
|
||||
updatedTextElement as ExcalidrawTextElementWithContainer,
|
||||
elementsMap,
|
||||
);
|
||||
coordX = x;
|
||||
coordY = y;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user