feat: auto-select imported items after upload
Pass SelectionManager to setupDragDrop and setupPaste. After each upload completes, the newly created scene items are selected: - Single file/URL: selectOnly - Multi-file drop/paste: select all new items
This commit is contained in:
@@ -296,9 +296,9 @@ export function useCanvasSetup(deps: CanvasSetupDeps) {
|
||||
dropTarget = canvasEl?.parentElement ?? null;
|
||||
}
|
||||
if (dropTarget) {
|
||||
dropCleanupRef.current = setupDragDrop(dropTarget, viewport, scene, resolvedBoardId, onCanvasChange);
|
||||
dropCleanupRef.current = setupDragDrop(dropTarget, viewport, scene, resolvedBoardId, onCanvasChange, selection);
|
||||
}
|
||||
pasteCleanupRef.current = setupPaste(viewport, scene, resolvedBoardId, onCanvasChange);
|
||||
pasteCleanupRef.current = setupPaste(viewport, scene, resolvedBoardId, onCanvasChange, selection);
|
||||
}
|
||||
}, 200);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user