diff --git a/frontend/src/Graph.svelte b/frontend/src/Graph.svelte index 7f867cc..6d535b6 100644 --- a/frontend/src/Graph.svelte +++ b/frontend/src/Graph.svelte @@ -54,8 +54,15 @@ import TaskDetailEditor from "./TaskDetailEditor.svelte"; function eventHandler(hovering: CustomEvent) { if (hovering.detail) { hoveredTask = task; + if (!selection.has(task) && !dragInProgress) { + selection.clear(); + selection.add(task); + selection = selection; + } + eventDispatcher("preSelectTask", task); } else { if (hoveredTask?.id == task.id) hoveredTask = null; + eventDispatcher("unPreSelectTask", task); } } return eventHandler;