Browse Source

removed compatibility with old format, small fix in editor

mj-deploy
Vašek Šraier 4 years ago
parent
commit
46afc555d6
  1. 1
      frontend/src/Editor.svelte
  2. 8
      frontend/src/tasks.ts

1
frontend/src/Editor.svelte

@ -242,7 +242,6 @@
<Graph
{tasks}
{repulsionForce}
on:selectTask={clickTask}
on:preSelectTask={startHovering}
bind:this={graph}

8
frontend/src/tasks.ts

@ -50,14 +50,6 @@ export function createEdges(nodes: TaskDescriptor[]): TaskEdge[] {
export async function loadTasks(): Promise<TasksFile> {
const r = await fetch("/tasks.json")
const j = await r.json()
// backward compatibility
if (j.positions != null) {
for (const [id, pos] of Object.entries(j.positions)) {
j.tasks.find((t) => t.id == id).position = pos;
}
}
return j
}