mirror of
https://github.com/openziti/zrok.git
synced 2024-11-29 11:34:07 +01:00
lint (#107)
This commit is contained in:
parent
b05733b602
commit
0377214761
@ -11,7 +11,7 @@ const Network = (props) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fg = targetRef.current;
|
const fg = targetRef.current;
|
||||||
fg.d3Force('collide', d3.forceCollide(22));
|
fg.d3Force('collide', d3.forceCollide().radius(30));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const paintNode = (node, ctx) => {
|
const paintNode = (node, ctx) => {
|
||||||
@ -31,6 +31,7 @@ const Network = (props) => {
|
|||||||
|
|
||||||
ctx.fillStyle = nodeColor;
|
ctx.fillStyle = nodeColor;
|
||||||
ctx.fillRect(node.x - (nodeWidth / 2), node.y - 7, nodeWidth, 14);
|
ctx.fillRect(node.x - (nodeWidth / 2), node.y - 7, nodeWidth, 14);
|
||||||
|
|
||||||
ctx.fillStyle = textColor;
|
ctx.fillStyle = textColor;
|
||||||
ctx.fillText(node.label, node.x, node.y);
|
ctx.fillText(node.label, node.x, node.y);
|
||||||
}
|
}
|
||||||
@ -50,6 +51,7 @@ const Network = (props) => {
|
|||||||
linkWidth={1.5}
|
linkWidth={1.5}
|
||||||
nodeCanvasObject={paintNode}
|
nodeCanvasObject={paintNode}
|
||||||
backgroundColor={"#3b2693"}
|
backgroundColor={"#3b2693"}
|
||||||
|
cooldownTicks={100}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user