mirror of
https://github.com/openziti/zrok.git
synced 2025-02-22 05:01:01 +01:00
tweaks, polish, and lint removal (#107)
This commit is contained in:
parent
1c2cfe710a
commit
cbae0d1d21
@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user