mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
redraw to correctly position text
This commit is contained in:
parent
cc224b156d
commit
a99ca82389
1 changed files with 3 additions and 26 deletions
|
@ -6,7 +6,7 @@ import { pointFrom, pointRotateRads } from "@excalidraw/math";
|
|||
|
||||
import { atom, editorJotaiStore, useAtom } from "../editor-jotai";
|
||||
|
||||
import { getElementAbsoluteCoords, refreshTextDimensions } from "../element";
|
||||
import { getElementAbsoluteCoords } from "../element";
|
||||
import {
|
||||
getFontString,
|
||||
sceneCoordsToViewportCoords,
|
||||
|
@ -21,10 +21,10 @@ import {
|
|||
import { t } from "../i18n";
|
||||
|
||||
import {
|
||||
computeBoundTextPosition,
|
||||
getBoundTextElement,
|
||||
getBoundTextMaxHeight,
|
||||
getBoundTextMaxWidth,
|
||||
redrawTextBoundingBox,
|
||||
} from "../element/textElement";
|
||||
import { wrapText } from "../element/textWrapping";
|
||||
import { measureText } from "../element/textMeasurements";
|
||||
|
@ -376,30 +376,7 @@ export const adjustBoundTextSize = (
|
|||
false,
|
||||
);
|
||||
|
||||
const { x, y } = computeBoundTextPosition(container, boundText, elementsMap);
|
||||
|
||||
mutateElement(
|
||||
boundText,
|
||||
{
|
||||
x,
|
||||
y,
|
||||
},
|
||||
false,
|
||||
);
|
||||
|
||||
mutateElement(
|
||||
boundText,
|
||||
{
|
||||
...refreshTextDimensions(
|
||||
boundText,
|
||||
container,
|
||||
elementsMap,
|
||||
boundText.originalText,
|
||||
),
|
||||
containerId: container.id,
|
||||
},
|
||||
false,
|
||||
);
|
||||
redrawTextBoundingBox(boundText, container, elementsMap, false);
|
||||
};
|
||||
|
||||
export const switchShapes = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue