diff --git a/frontend/src/Editor.svelte b/frontend/src/Editor.svelte index 29a46ae..4973d10 100644 --- a/frontend/src/Editor.svelte +++ b/frontend/src/Editor.svelte @@ -16,6 +16,7 @@ let currentTask: TaskDescriptor | null = null; let nodeDraggingEnabled: boolean = false; let angle: number; + let showHiddenEdges: boolean = false; const { open } = getContext("simple-modal"); function clickTask(e: CustomEvent) { @@ -203,7 +204,8 @@ on:preSelectTask={startHovering} bind:this={graph} {nodeDraggingEnabled} - on:openTask={openTaskDetailEditorButton} /> + on:openTask={openTaskDetailEditorButton} + {showHiddenEdges} />
@@ -238,6 +240,11 @@ vrcholů
+
+ +
{#if clicked.length > 0 && getTask(clicked[clicked.length - 1]).type == "label"}
Úhel rotace: diff --git a/frontend/src/Graph.svelte b/frontend/src/Graph.svelte index be08632..df377db 100644 --- a/frontend/src/Graph.svelte +++ b/frontend/src/Graph.svelte @@ -13,6 +13,7 @@ export let tasks: TasksFile; export let repulsionForce: number = -1000; export let nodeDraggingEnabled: boolean = false; + export let showHiddenEdges: boolean = false; let hoveredTask: null | string = null; @@ -135,7 +136,7 @@ {#each edges as edge} - + {/each} {#each nodes as task} ; + export let showLabelEdge: boolean = false; $: x1 = edge?.source?.x ?? 0; $: y1 = edge?.source?.y ?? 0; @@ -12,4 +13,6 @@ $: dy = y1 - y2 - +{#if showLabelEdge || (edge?.target?.task?.type ?? null) != "label"} + +{/if} diff --git a/tasks.json b/tasks.json index 67712ab..093e24c 100644 --- a/tasks.json +++ b/tasks.json @@ -5,7 +5,8 @@ "type": "open-data", "comment": "Kevin a magnety - triviální, lineární průchod pole", "requires": [ - "jak-resit-ulohy" + "jak-resit-ulohy", + "label-1d-pole" ] }, { @@ -95,7 +96,8 @@ "type": "open-data", "comment": "Hra Othello - link na 26-Z1-2, procházení 2D pole po různých směrech", "requires": [ - "26-Z1-1" + "26-Z1-1", + "label-2d-pole" ] }, { @@ -117,7 +119,8 @@ "type": "open-data", "comment": "Kevinova želva — triviální, průchod po 2D souřadnicích", "requires": [ - "jak-resit-ulohy" + "jak-resit-ulohy", + "label-zelvy" ] }, { @@ -247,7 +250,9 @@ { "id": "start", "type": "text", - "requires": [], + "requires": [ + "label-uvod" + ], "comment": "úvodní kecy o tom, jak to celé funguje" } ],