tweaks, polish, and lint removal (#107)

This commit is contained in:
Michael Quigley 2022-12-23 15:54:15 -05:00
parent 1c2cfe710a
commit cbae0d1d21
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 3 additions and 5 deletions

View File

@ -17,7 +17,7 @@ const Network = (props) => {
const paintNode = (node, ctx) => {
let nodeColor = "#636363";
let textColor = "white";
let textColor = "#ccc";
switch(node.type) {
case "environment":
nodeColor = "#444";
@ -29,7 +29,7 @@ const Network = (props) => {
ctx.textBaseline = "middle";
ctx.textAlign = "center";
ctx.font = "6px 'JetBrains Mono'";
ctx.font = "6px 'Russo One'";
let extents = ctx.measureText(node.label);
let nodeWidth = extents.width + 10;
@ -68,8 +68,6 @@ const Network = (props) => {
nodeCanvasObject={paintNode}
backgroundColor={"#3b2693"}
cooldownTicks={300}
d3VelocityDecay={0.3}
d3AlphaDecay={0.0128}
/>
)
}

View File

@ -82,7 +82,7 @@ export const mergeGraph = (oldGraph, user, newOverview) => {
outputLinks.push(...newGraph.links.filter(newLink => !outputLinks.find(oldLink => oldLink.target === newLink.target && oldLink.source === newLink.source)));
return {
// we need a new outer object, to trigger react to refresh the view correctly.
// we need a new outer object, to trigger react to refresh the view.
nodes: sortNodes(outputNodes),
links: outputLinks
};