mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Revert "Graph layout optimizations"
This commit is contained in:
@@ -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)
|
||||
]));
|
||||
}
|
||||
Reference in New Issue
Block a user