summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/gitGraph.js
blob: a18c575163b8ceb4ffd1b6ad03b573554f1c909f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
export default async function initGitGraph() {
  const graphCanvas = document.getElementById('graph-canvas');
  if (!graphCanvas) return;

  const { default: gitGraph } = await import(/* webpackChunkName: "gitgraph" */'../vendor/gitGraph.js');

  const graphList = [];
  $('#graph-raw-list li span.node-relation').each(function () {
    graphList.push($(this).text());
  });

  gitGraph(graphCanvas, graphList);
}