diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index 276d8b51..272d2781 100644 --- a/src/element/textWysiwyg.tsx +++ b/src/element/textWysiwyg.tsx @@ -163,8 +163,7 @@ export const textWysiwyg = ({ } } const [viewportX, viewportY] = getViewportCoords(coordX, coordY); - const { textAlign, angle } = updatedElement; - + const { textAlign } = updatedElement; editable.value = updatedElement.originalText || updatedElement.text; const lines = updatedElement.originalText.split("\n"); const lineHeight = updatedElement.containerId @@ -194,6 +193,7 @@ export const textWysiwyg = ({ ? ((appState.zoom.value * 100 - 100) / 10) * 14 : 0)) / appState.zoom.value; + const angle = container ? container.angle : updatedElement.angle; Object.assign(editable.style, { font: getFontString(updatedElement), // must be defined *after* font ¯\_(ツ)_/¯ @@ -460,6 +460,7 @@ export const textWysiwyg = ({ width: Number(editable.style.width.slice(0, -2)), // preserve padding x: container.x + BOUND_TEXT_PADDING, + angle: container.angle, }); const boundTextElementId = getBoundTextElementId(container); if (!boundTextElementId || boundTextElementId !== element.id) {