Fix type error - unused preSelect events
This commit is contained in:
parent
89702956c6
commit
9092f6c137
2 changed files with 1 additions and 10 deletions
|
@ -39,9 +39,7 @@
|
|||
<div style="height: 100%">
|
||||
<Graph
|
||||
tasks={t}
|
||||
on:selectTask={(e) => { 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}`)}}/>
|
||||
</div>
|
||||
</TasksLoader>
|
||||
{/if}
|
||||
|
|
|
@ -54,15 +54,8 @@ import TaskDetailEditor from "./TaskDetailEditor.svelte";
|
|||
function eventHandler(hovering: CustomEvent<boolean>) {
|
||||
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;
|
||||
|
|
Reference in a new issue