mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
small tweaks
This commit is contained in:
parent
50fce7e5f2
commit
6419835677
2 changed files with 2 additions and 3 deletions
|
@ -182,7 +182,7 @@ const bindTextToContainer = (
|
|||
containerProps: ValidContainer | ({ type: "arrow" } & ValidLinearElement),
|
||||
textProps: { text: string } & MarkOptional<ElementConstructorOpts, "x" | "y">,
|
||||
) => {
|
||||
let container;
|
||||
let container: ExcalidrawGenericElement | ExcalidrawLinearElement;
|
||||
if (containerProps.type === "arrow") {
|
||||
const width = containerProps.width || DEFAULT_LINEAR_ELEMENT_PROPS.width;
|
||||
const height = containerProps.height || DEFAULT_LINEAR_ELEMENT_PROPS.height;
|
||||
|
@ -220,7 +220,7 @@ const bindTextToContainer = (
|
|||
|
||||
redrawTextBoundingBox(textElement, container);
|
||||
|
||||
return [container, textElement];
|
||||
return [container, textElement] as const;
|
||||
};
|
||||
|
||||
const bindLinearElementToElement = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue