Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function renderBranchesPaths(
branchesPaths: RenderedData["branchesPaths"],
): SVGElement {
const offset = gitgraph.template.commit.dot.size;
const isBezier = gitgraph.template.branch.mergeStyle === MergeStyle.Bezier;
const paths = Array.from(branchesPaths).map(([branch, coordinates]) => {
return createPath({
d: toSvgPath(
coordinates.map((coordinate) => coordinate.map(getWithCommitOffset)),
isBezier,
gitgraph.isVertical,
),
fill: "transparent",
stroke: branch.computedColor || "",
strokeWidth: branch.style.lineWidth,
translate: {
x: offset,
y: offset,
},
});
private renderBranchesPaths() {
const offset = this.gitgraph.template.commit.dot.size;
const isBezier =
this.gitgraph.template.branch.mergeStyle === MergeStyle.Bezier;
return Array.from(this.state.branchesPaths).map(([branch, coordinates]) => (