Browse Source

Fix type errors

mj-deploy
Standa Lukeš 4 years ago
parent
commit
6a6c13a5d8
  1. 6
      frontend/src/force-simulation.ts
  2. 1
      frontend/src/ksp-task-grabber.ts

6
frontend/src/force-simulation.ts

@ -91,10 +91,8 @@ export function forceSimulation(tasks: TasksFile, ticked: (positions: Map<string
.force( .force(
"link", "link",
d3 d3
.forceLink() // This force provides links between nodes .forceLink<TaskId, SimulationLinkDatum<TaskId>>() // This force provides links between nodes
.id(function (d) { .id(d => d.id) // This provide the id of a node
return d.id;
}) // This provide the id of a node
.links(edges) // and this the list of links .links(edges) // and this the list of links
) )
.force("charge", d3.forceManyBody().strength(repulsionForce)) // This adds repulsion between nodes. Play with the -400 for the repulsion strength .force("charge", d3.forceManyBody().strength(repulsionForce)) // This adds repulsion between nodes. Play with the -400 for the repulsion strength

1
frontend/src/ksp-task-grabber.ts

@ -1,4 +1,3 @@
import type { TaskId } from "./graph-types"
export type TaskAssignmentData = { export type TaskAssignmentData = {
id: string, id: string,