feat: support image background editor [wip]

This commit is contained in:
dwelle 2021-12-20 21:50:16 +01:00
parent 8b5657e1ce
commit 3c83a322b6
15 changed files with 361 additions and 29 deletions

View file

@ -4,15 +4,13 @@ import {
NonDeleted,
} from "../element/types";
import { getNonDeletedElements, isNonDeletedElement } from "../element";
import { LinearElementEditor } from "../element/linearElementEditor";
type ElementIdKey = InstanceType<typeof LinearElementEditor>["elementId"];
type ElementKey = ExcalidrawElement | ElementIdKey;
type ElementKey = ExcalidrawElement | ExcalidrawElement["id"];
type SceneStateCallback = () => void;
type SceneStateCallbackRemover = () => void;
const isIdKey = (elementKey: ElementKey): elementKey is ElementIdKey => {
const isIdKey = (elementKey: ElementKey): elementKey is string => {
if (typeof elementKey === "string") {
return true;
}