Nikolai Sviridov
12/10/2021, 5:20 PM<ForceGraph2D
...
nodePointerAreaPaint={(node, color, ctx) => {
...
// this case
bckgDimensions && ctx.fillRect(node.x - bckgDimensions[0] / 2, node.y - bckgDimensions[1] / 2, ...bckgDimensions);
}}
/>
How to wrap bckgDimensions && ctx.fillRect(...)
? bckgDimension
is array of 2 Numbers.turansky
12/10/2021, 5:26 PMJsPair
?Nikolai Sviridov
12/15/2021, 5:18 PMturansky
12/15/2021, 5:29 PMif (bckgDimensions != null) {
...
}