mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-08 10:47:44 +02:00
[eric] dashboard: plain click selects the card so spawn-beside-selection fires without shift/marquee
This commit is contained in:
@@ -96,10 +96,11 @@ export function useDashboardSelection(
|
||||
}
|
||||
return next;
|
||||
}
|
||||
if (prev.has(id)) {
|
||||
return new Map();
|
||||
// Plain click selects the clicked card (collapsing any multi-select to it) so spawn-beside-selection actually fires; deselect = empty-canvas click or Esc.
|
||||
if (prev.size === 1 && prev.has(id)) {
|
||||
return prev;
|
||||
}
|
||||
return prev;
|
||||
return new Map([[id, type]]);
|
||||
});
|
||||
},
|
||||
[],
|
||||
|
||||
Reference in New Issue
Block a user