Files
weave-scope/client/app/scripts/charts/node-shape-circle.js
Simon Howe 2c626776a1 Grey out bottom of stack when there aren't 3 nodes in the stack
E.g. greying out the bottom 2/3 visual nodes if the stack actually only
has a single node.

- Server returns "node_count" for agg nodes.
2016-02-22 12:42:37 +01:00

23 lines
590 B
JavaScript

import React from 'react';
export default function NodeShapeCircle({onlyHighlight, highlighted, size, color}) {
const hightlightNode = <circle r={size * 0.7} className="highlighted" />;
if (onlyHighlight) {
return (
<g className="shape">
{highlighted && hightlightNode}
</g>
);
}
return (
<g className="shape">
{highlighted && hightlightNode}
<circle r={size * 0.5} className="border" stroke={color} />
<circle r={size * 0.45} className="shadow" />
<circle r={Math.max(2, size * 0.125)} className="node" />
</g>
);
}