mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-11-10 11:35:52 +01:00
fix: rotate bounded text when container is rotated before typing (#4535)
This commit is contained in:
parent
b71e702991
commit
a2e8806f57
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user