UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

22 lines 975 B
import { serializeAppendable } from "../../api/serializer/serialize"; import { getMultipleSelection } from "../../states/useMultipleSelection"; import { flushMultipleSelectionTargets } from "../../states/useMultipleSelectionTargets"; import { getTransformControlsDragging } from "../../states/useTransformControlsDragging"; import { pushUndoStack } from "../../api/undoStack"; import getAllSelectionTargets from "../../throttle/getAllSelectionTargets"; export default () => { if (getTransformControlsDragging() || getMultipleSelection()) return; flushMultipleSelectionTargets(() => { const commandRecord = {}; for (const target of getAllSelectionTargets()) { commandRecord[target.uuid] = { command: "delete", ...serializeAppendable(target, false) }; target.dispose(); } pushUndoStack(commandRecord); }, true); }; //# sourceMappingURL=deleteSelected.js.map