small tweaks

This commit is contained in:
dwelle 2023-08-01 13:46:39 +02:00
parent 50fce7e5f2
commit 6419835677
2 changed files with 2 additions and 3 deletions

View file

@ -42,7 +42,6 @@ import {
getDefaultLineHeight,
measureBaseline,
} from "../element/textElement";
import { normalizeLink } from "./url";
type RestoredAppState = Omit<

View file

@ -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 = (