MCPcopy Create free account
hub / github.com/CoderOpen/waimai / _loop

Function _loop

front/components/u-charts/u-charts.js:3452–3470  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

3450 // draw split line grid
3451
3452 var _loop = function _loop(i) {
3453 var startPos = {};
3454 context.beginPath();
3455 context.setLineWidth(1 * opts.pixelRatio);
3456 context.setStrokeStyle(radarOption.gridColor);
3457 coordinateAngle.forEach(function(angle, index) {
3458 var pos = convertCoordinateOrigin(radius / config.radarGridCount * i * Math.cos(angle), radius / config.radarGridCount *
3459 i * Math.sin(angle), centerPosition);
3460 if (index === 0) {
3461 startPos = pos;
3462 context.moveTo(pos.x, pos.y);
3463 } else {
3464 context.lineTo(pos.x, pos.y);
3465 }
3466 });
3467 context.lineTo(startPos.x, startPos.y);
3468 context.stroke();
3469 context.closePath();
3470 };
3471
3472 for (var i = 1; i <= config.radarGridCount; i++) {
3473 _loop(i);

Callers 1

drawRadarDataPointsFunction · 0.85

Calls 1

convertCoordinateOriginFunction · 0.85

Tested by

no test coverage detected