How to use the @gitgraph/core.toSvgPath function in @gitgraph/core

To help you get started, we’ve selected a few @gitgraph/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nicoespeon / gitgraph.js / packages / gitgraph-react / src / Gitgraph.tsx View on Github external
return Array.from(this.state.branchesPaths).map(([branch, coordinates]) => (
github nicoespeon / gitgraph.js / packages / gitgraph-js / src / gitgraph.ts View on Github external
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,
        },
      });
    });

@gitgraph/core

Core of gitgraph, a JavaScript library to draw pretty git graphs

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis