MCPcopy Create free account
hub / github.com/GCWing/BitFun / mkPath

Function mkPath

MiniApp/Demo/git-graph/source/ui.js:470–479  ·  view source on GitHub ↗
(dAttr, stroke, dash)

Source from the content-addressed store, hash-verified

468 function laneX(l) { return l * LANE_W + LANE_W / 2 + 4; }
469
470 function mkPath(dAttr, stroke, dash) {
471 const p = document.createElementNS(svgNS, 'path');
472 p.setAttribute('d', dAttr);
473 p.setAttribute('stroke', stroke);
474 p.setAttribute('fill', 'none');
475 p.setAttribute('stroke-width', '1.5');
476 p.setAttribute('class', 'graph-line');
477 if (dash) p.setAttribute('stroke-dasharray', dash);
478 return p;
479 }
480
481 for (let l = 0; l < lanesBefore.length; l++) {
482 if (lanesBefore[l] !== null && l !== lane) {

Callers 1

ui.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected