mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-12-05 18:55:28 +03:00
Groups, frames and containers are collected from all elements, so duplicating them also copied their deleted members. A copy of a deleted element is born deleted and can never be restored; it only took up space and got selected, which tripped the getSelectedElements invariant. Also set the elements and the selection in one update in the z-index tests, so no render pairs the new elements with the previous selection.
@excalidraw/element
Install
npm install @excalidraw/element
If you prefer Yarn over npm, use this command to install the Excalidraw utils package:
yarn add @excalidraw/element
With PNPM, similarly install the package with this command:
pnpm add @excalidraw/element