mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 06:21:16 +02:00
fix: stale labeled arrow bounds cache after editing the label (#6893)
* fix stale labeled arrow bounds cache after editing the label * add arrow bounds test * fix test to check the arrow version * fix * fix test - remove unused import * Update src/element/textWysiwyg.test.tsx --------- Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
ExcalidrawTextContainer,
|
||||
} from "./types";
|
||||
import { AppState } from "../types";
|
||||
import { mutateElement } from "./mutateElement";
|
||||
import { bumpVersion, mutateElement } from "./mutateElement";
|
||||
import {
|
||||
getBoundTextElementId,
|
||||
getContainerElement,
|
||||
@@ -541,6 +541,9 @@ export const textWysiwyg = ({
|
||||
id: element.id,
|
||||
}),
|
||||
});
|
||||
} else if (isArrowElement(container)) {
|
||||
// updating an arrow label may change bounds, prevent stale cache:
|
||||
bumpVersion(container);
|
||||
}
|
||||
} else {
|
||||
mutateElement(container, {
|
||||
|
Reference in New Issue
Block a user