Browse Source

graph: revert of mistakenly removed event dispatch in b1aea589b94cec8ccd

mj-deploy
Vašek Šraier 4 years ago
parent
commit
1237d32514
  1. 7
      frontend/src/Graph.svelte

7
frontend/src/Graph.svelte

@ -54,8 +54,15 @@ import TaskDetailEditor from "./TaskDetailEditor.svelte";
function eventHandler(hovering: CustomEvent<boolean>) { function eventHandler(hovering: CustomEvent<boolean>) {
if (hovering.detail) { if (hovering.detail) {
hoveredTask = task; hoveredTask = task;
if (!selection.has(task) && !dragInProgress) {
selection.clear();
selection.add(task);
selection = selection;
}
eventDispatcher("preSelectTask", task);
} else { } else {
if (hoveredTask?.id == task.id) hoveredTask = null; if (hoveredTask?.id == task.id) hoveredTask = null;
eventDispatcher("unPreSelectTask", task);
} }
} }
return eventHandler; return eventHandler;