Revert "Graph layout optimizations"

This commit is contained in:
Filip Barl
2017-02-02 11:42:12 +01:00
committed by GitHub
parent 95c688d1b1
commit 8eaa12e680
33 changed files with 870 additions and 795 deletions

View File

@@ -1,12 +0,0 @@
import { line, curveCardinalClosed } from 'd3-shape';
import range from 'lodash/range';
const shapeSpline = line().curve(curveCardinalClosed.tension(0.65));
export function nodeShapePolygon(radius, n) {
const innerAngle = (2 * Math.PI) / n;
return shapeSpline(range(0, n).map(k => [
radius * Math.sin(k * innerAngle),
-radius * Math.cos(k * innerAngle)
]));
}