Merge branch 'develop' into feature/remove-lodash

This commit is contained in:
Knut Sveidqvist
2020-05-13 17:34:26 +02:00
committed by GitHub
22 changed files with 138 additions and 120 deletions

View File

@@ -1,4 +1,4 @@
import * as d3 from 'd3';
import { curveBasis, line, select } from 'd3';
import db from './gitGraphAst';
import gitGraphParser from './parser/gitGraph';
@@ -53,10 +53,9 @@ function svgCreateDefs(svg) {
}
function svgDrawLine(svg, points, colorIdx, interpolate) {
const curve = interpolateToCurve(interpolate, d3.curveBasis);
const curve = interpolateToCurve(interpolate, curveBasis);
const color = config.branchColors[colorIdx % config.branchColors.length];
const lineGen = d3
.line()
const lineGen = line()
.x(function(d) {
return Math.round(d.x);
})
@@ -317,7 +316,7 @@ export const draw = function(txt, id, ver) {
config.nodeLabel.width = '100%';
config.nodeLabel.y = -1 * 2 * config.nodeRadius;
}
const svg = d3.select(`[id="${id}"]`);
const svg = select(`[id="${id}"]`);
svgCreateDefs(svg);
branchNum = 1;
for (let branch in branches) {