mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix es & ts build
This commit is contained in:
parent
931d03d514
commit
fc225c5353
18 changed files with 73 additions and 54 deletions
|
@ -13,6 +13,8 @@ import {
|
|||
isLinearElement,
|
||||
} from "@excalidraw/element/typeChecks";
|
||||
|
||||
import type { Mutable } from "@excalidraw/excalidraw/utility-types";
|
||||
|
||||
import type {
|
||||
ExcalidrawElement,
|
||||
NonDeletedExcalidrawElement,
|
||||
|
@ -512,7 +514,10 @@ export const _generateElementShape = (
|
|||
|
||||
if (isPathALoop(element.points)) {
|
||||
// generate rough polygon to fill freedraw shape
|
||||
const simplifiedPoints = simplify(element.points, 0.75);
|
||||
const simplifiedPoints = simplify(
|
||||
element.points as Mutable<LocalPoint[]>,
|
||||
0.75,
|
||||
);
|
||||
shape = generator.curve(simplifiedPoints as [number, number][], {
|
||||
...generateRoughOptions(element),
|
||||
stroke: "none",
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
|
||||
import { getCurvePathOps } from "@excalidraw/utils/geometry/shape";
|
||||
import { generateRoughOptions } from "@excalidraw/element/Shape";
|
||||
import { ShapeCache } from "@excalidraw/element/ShapeCache";
|
||||
|
||||
import type {
|
||||
Degrees,
|
||||
|
|
|
@ -5,6 +5,8 @@ import {
|
|||
import { KEYS, invariant, toBrandedType } from "@excalidraw/common";
|
||||
import { aabbForElement } from "@excalidraw/element";
|
||||
|
||||
import { pointFrom, type LocalPoint } from "@excalidraw/math";
|
||||
|
||||
import type {
|
||||
AppState,
|
||||
PendingExcalidrawElements,
|
||||
|
|
|
@ -5,12 +5,13 @@ import {
|
|||
toBrandedType,
|
||||
} from "@excalidraw/common";
|
||||
|
||||
// TODO_SEP: should be passed in or injected instead
|
||||
import Scene from "@excalidraw/excalidraw/scene/Scene";
|
||||
|
||||
import type { Radians } from "@excalidraw/math";
|
||||
|
||||
import type { Mutable } from "@excalidraw/excalidraw/utility-types";
|
||||
|
||||
import Scene from "../scene/Scene";
|
||||
|
||||
import { ShapeCache } from "./ShapeCache";
|
||||
|
||||
import { updateElbowArrowPoints } from "./elbowArrow";
|
||||
|
|
|
@ -38,7 +38,7 @@ import {
|
|||
import { getContainingFrame } from "@excalidraw/element/frame";
|
||||
import { getCornerRadius } from "@excalidraw/element/shapes";
|
||||
|
||||
// TODO: consider separating
|
||||
// TODO_SEP: consider separating
|
||||
import { getVerticalOffset } from "@excalidraw/excalidraw/fonts/FontMetadata";
|
||||
|
||||
import type {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue