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(
"link",
d3
.forceLink() // This force provides links between nodes
.id(function (d) {
return d.id;
}) // This provide the id of a node
.forceLink<TaskId, SimulationLinkDatum<TaskId>>() // This force provides links between nodes
.id(d => d.id) // This provide the id of a node
.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

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

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