mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 15:31:04 +02:00
@@ -1,11 +1,6 @@
|
||||
import { average } from "@excalidraw/math";
|
||||
import { isImageElement } from "@excalidraw/element";
|
||||
|
||||
import type {
|
||||
ExcalidrawBindableElement,
|
||||
FontFamilyValues,
|
||||
FontString,
|
||||
} from "@excalidraw/element/types";
|
||||
import type { FontFamilyValues, FontString } from "@excalidraw/element/types";
|
||||
|
||||
import type {
|
||||
ActiveTool,
|
||||
@@ -567,9 +562,6 @@ export const isTransparent = (color: string) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const isAlwaysInsideBinding = (element: ExcalidrawBindableElement) =>
|
||||
isImageElement(element);
|
||||
|
||||
export type ResolvablePromise<T> = Promise<T> & {
|
||||
resolve: [T] extends [undefined]
|
||||
? (value?: MaybePromise<Awaited<T>>) => void
|
||||
|
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
KEYS,
|
||||
arrayToMap,
|
||||
invariant,
|
||||
isAlwaysInsideBinding,
|
||||
isTransparent,
|
||||
} from "@excalidraw/common";
|
||||
import { KEYS, arrayToMap, invariant, isTransparent } from "@excalidraw/common";
|
||||
|
||||
import {
|
||||
lineSegment,
|
||||
@@ -53,6 +47,7 @@ import {
|
||||
isBindableElement,
|
||||
isBoundToContainer,
|
||||
isElbowArrow,
|
||||
isImageElement,
|
||||
isRectanguloidElement,
|
||||
isTextElement,
|
||||
} from "./typeChecks";
|
||||
@@ -107,6 +102,9 @@ export const getFixedBindingDistance = (
|
||||
element: ExcalidrawBindableElement,
|
||||
): number => FIXED_BINDING_DISTANCE + element.strokeWidth / 2;
|
||||
|
||||
export const isAlwaysInsideBinding = (element: ExcalidrawBindableElement) =>
|
||||
isImageElement(element);
|
||||
|
||||
export const shouldEnableBindingForPointerEvent = (
|
||||
event: React.PointerEvent<HTMLElement>,
|
||||
) => {
|
||||
|
Reference in New Issue
Block a user