Keep text label horizontal

This commit is contained in:
Mark Tolmacs 2025-04-09 17:58:39 +02:00
parent dff69e9191
commit 6b13e889f1
3 changed files with 4 additions and 7 deletions

View file

@ -50,7 +50,7 @@ export const redrawTextBoundingBox = (
text: textElement.text, text: textElement.text,
width: textElement.width, width: textElement.width,
height: textElement.height, height: textElement.height,
angle: container?.angle ?? textElement.angle, angle: textElement.angle,
}; };
boundTextUpdates.text = textElement.text; boundTextUpdates.text = textElement.text;

View file

@ -4735,12 +4735,10 @@ History {
"updated": Map { "updated": Map {
"id164" => Delta { "id164" => Delta {
"deleted": { "deleted": {
"angle": 0,
"x": 15, "x": 15,
"y": 15, "y": 15,
}, },
"inserted": { "inserted": {
"angle": 0,
"x": 15, "x": 15,
"y": 15, "y": 15,
}, },
@ -4909,7 +4907,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] element 1 1`] = ` exports[`history > multiplayer undo/redo > conflicts in bound text elements and their containers > should redraw remotely added bound text when it's container is updated through the history > [end of test] element 1 1`] = `
{ {
"angle": 90, "angle": 0,
"autoResize": true, "autoResize": true,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,

View file

@ -4057,7 +4057,7 @@ describe("history", () => {
// text element got redrawn! // text element got redrawn!
x: 205, x: 205,
y: 205, y: 205,
angle: 90, angle: 0,
id: text.id, id: text.id,
containerId: container.id, containerId: container.id,
isDeleted: false, isDeleted: false,
@ -4101,7 +4101,7 @@ describe("history", () => {
...textProps, ...textProps,
x: 205, x: 205,
y: 205, y: 205,
angle: 90, angle: 0,
id: text.id, id: text.id,
containerId: container.id, containerId: container.id,
isDeleted: false, isDeleted: false,
@ -4123,7 +4123,6 @@ describe("history", () => {
newElementWith(h.elements[0], { newElementWith(h.elements[0], {
x: 205, x: 205,
y: 205, y: 205,
angle: 90 as Radians,
}), }),
], ],
captureUpdate: CaptureUpdateAction.IMMEDIATELY, captureUpdate: CaptureUpdateAction.IMMEDIATELY,