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