fix: undo should work when selecting bounded textr (#4537)
This commit is contained in:
parent
5c67329be6
commit
b71e702991
@ -11,7 +11,6 @@ import { BOUND_TEXT_PADDING } from "../constants";
|
|||||||
import { MaybeTransformHandleType } from "./transformHandles";
|
import { MaybeTransformHandleType } from "./transformHandles";
|
||||||
import Scene from "../scene/Scene";
|
import Scene from "../scene/Scene";
|
||||||
import { AppState } from "../types";
|
import { AppState } from "../types";
|
||||||
import { isTextElement } from ".";
|
|
||||||
|
|
||||||
export const redrawTextBoundingBox = (
|
export const redrawTextBoundingBox = (
|
||||||
element: ExcalidrawTextElement,
|
element: ExcalidrawTextElement,
|
||||||
@ -21,10 +20,9 @@ export const redrawTextBoundingBox = (
|
|||||||
const maxWidth = container
|
const maxWidth = container
|
||||||
? container.width - BOUND_TEXT_PADDING * 2
|
? container.width - BOUND_TEXT_PADDING * 2
|
||||||
: undefined;
|
: undefined;
|
||||||
let text = element.originalText;
|
let text = element.text;
|
||||||
// Call wrapText only when updating text properties
|
|
||||||
// By clicking on the container
|
if (container) {
|
||||||
if (container && !isTextElement(appState.editingElement)) {
|
|
||||||
text = wrapText(
|
text = wrapText(
|
||||||
element.originalText,
|
element.originalText,
|
||||||
getFontString(element),
|
getFontString(element),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user