UNPKG

sigma

Version:

A JavaScript library dedicated to graph drawing.

12 lines (11 loc) 343 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var PI_TIMES_2 = Math.PI * 2; 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(); } exports.default = drawNode;