From 9092f6c1378c334dbf7f36fcf79fc6f08f340d07 Mon Sep 17 00:00:00 2001 From: exyi Date: Sat, 17 Oct 2020 12:44:13 +0000 Subject: [PATCH] Fix type error - unused preSelect events --- frontend/src/App.svelte | 4 +--- frontend/src/Graph.svelte | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index ab291c9..fb14b56 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -39,9 +39,7 @@
{ if (e.detail.type != "label") (location.hash = `#task/${e.detail.id}`)}} - on:preSelectTask={(e) => taskPanel.preSelect(e.detail) } - on:unPreSelectTask={(e) => taskPanel.unPreselect(e.detail)} /> + on:selectTask={(e) => { if (e.detail.type != "label") (location.hash = `#task/${e.detail.id}`)}}/>
{/if} diff --git a/frontend/src/Graph.svelte b/frontend/src/Graph.svelte index c05259d..fa286fa 100644 --- a/frontend/src/Graph.svelte +++ b/frontend/src/Graph.svelte @@ -54,15 +54,8 @@ 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;