rect file selection

This commit is contained in:
2025-09-04 18:31:02 +02:00
parent cdd4151462
commit 735e825c7d
9 changed files with 187 additions and 24 deletions

View File

@@ -7,11 +7,11 @@ import type { DirectoryEntry } from '~/shared/types';
*/
export function getTargetsFromSelection(
targetEntry: DirectoryEntry,
selection: Set<DirectoryEntry>
selection: Map<string, DirectoryEntry>
): DirectoryEntry[] {
if (selection.size === 0 || !selection.has(targetEntry)) {
if (selection.size === 0 || !selection.has(targetEntry.name)) {
return [targetEntry];
}
return Array.from(selection);
return Array.from(selection.values());
}