<gh_stars>0
/**
 * Sigma.js Canvas Renderer Node Component
 * ========================================
 *
 * Function used by the canvas renderer to display a single node.
 */
const PI_TIMES_2 = Math.PI * 2;

export default function drawNode(context, data) {

  context.fillStyle = data.color;
  context.beginPath();
  context.arc(
    data.x,
    data.y,
    data.size,
    0,
    PI_TIMES_2,
    true
  );

  context.closePath();
  context.fill();
}
