Add NonDeleted<ExcalidrawElement> (#1068)
* add NonDeleted * make test:all script run tests without prompt * rename helper * replace with helper * make element contructors return nonDeleted elements * cache filtered elements where appliacable for better perf * rename manager element getter * remove unnecessary assertion * fix test * make element types in resizeElement into nonDeleted Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -10,6 +10,7 @@ import {
|
||||
actionBringToFront,
|
||||
actionSendToBack,
|
||||
} from "../actions";
|
||||
import { ExcalidrawElement } from "../element/types";
|
||||
|
||||
// Unmount ReactDOM from root
|
||||
ReactDOM.unmountComponentAtNode(document.getElementById("root")!);
|
||||
@ -27,7 +28,7 @@ function populateElements(
|
||||
const selectedElementIds: any = {};
|
||||
|
||||
h.elements = elements.map(({ id, isDeleted = false, isSelected = false }) => {
|
||||
const element: Mutable<ReturnType<typeof newElement>> = newElement({
|
||||
const element: Mutable<ExcalidrawElement> = newElement({
|
||||
type: "rectangle",
|
||||
x: 100,
|
||||
y: 100,
|
||||
|
Reference in New Issue
Block a user