From c03c6566c554173447a34c5b66829f25489df501 Mon Sep 17 00:00:00 2001 From: Vasek Sraier Date: Thu, 1 Oct 2020 13:23:26 +0200 Subject: [PATCH] graph: neda se klikat na labely --- frontend/src/App.svelte | 6 ++++-- frontend/src/Graph.svelte | 2 -- frontend/src/GraphNode.svelte | 18 +++++++++--------- frontend/src/TaskPanel.svelte | 3 +++ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 4525175..4255a8a 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -6,6 +6,8 @@ import TaskPanel from "./TaskPanel.svelte"; import Editor from "./Editor.svelte"; import Modal from "svelte-simple-modal"; +import GraphEdge from "./GraphEdge.svelte"; +import TaskDetailEditor from "./TaskDetailEditor.svelte"; const tasksPromise: Promise = loadTasks(); @@ -39,8 +41,8 @@
(location.hash = `#task/${e.detail.id}`)} - on:preSelectTask={(e) => taskPanel.preSelect(e.detail)} + 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)} />
diff --git a/frontend/src/Graph.svelte b/frontend/src/Graph.svelte index 7072d94..43777cf 100644 --- a/frontend/src/Graph.svelte +++ b/frontend/src/Graph.svelte @@ -7,8 +7,6 @@ import { createNodesAndEdges } from "./graph-types"; import { taskForce } from "./task-force"; import { taskStatuses } from './task-status-cache' - import { grabTaskStates, isLoggedIn } from "./ksp-task-grabber"; - import type { TaskStatus } from "./ksp-task-grabber" export let tasks: TasksFile; export let repulsionForce: number = -1000; diff --git a/frontend/src/GraphNode.svelte b/frontend/src/GraphNode.svelte index 8711c3b..b0bed78 100644 --- a/frontend/src/GraphNode.svelte +++ b/frontend/src/GraphNode.svelte @@ -73,9 +73,16 @@ + class="{status == null ? '' : status.solved ? 'solved' : status.submitted ? 'submitted' : ''} {task.task.type}"> {#if task.task.type == 'label'} {#if draggingEnabled } {/if}