refactor: decoupling global Scene state part-1 (#7577)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { isTextElement, refreshTextDimensions } from "../element";
|
||||
import { newElementWith } from "../element/mutateElement";
|
||||
import { getContainerElement } from "../element/textElement";
|
||||
import { isBoundToContainer } from "../element/typeChecks";
|
||||
import { ExcalidrawElement, ExcalidrawTextElement } from "../element/types";
|
||||
import { getFontString } from "../utils";
|
||||
@@ -57,7 +58,13 @@ export class Fonts {
|
||||
ShapeCache.delete(element);
|
||||
didUpdate = true;
|
||||
return newElementWith(element, {
|
||||
...refreshTextDimensions(element),
|
||||
...refreshTextDimensions(
|
||||
element,
|
||||
getContainerElement(
|
||||
element,
|
||||
this.scene.getElementsMapIncludingDeleted(),
|
||||
),
|
||||
),
|
||||
});
|
||||
}
|
||||
return element;
|
||||
|
||||
Reference in New Issue
Block a user