MCPcopy Create free account
hub / github.com/idank/explainshell / diagonal

Function diagonal

explainshell/web/static/js/d3.v3.js:7028–7038  ·  view source on GitHub ↗
(d, i)

Source from the content-addressed store, hash-verified

7026 d3.svg.diagonal = function() {
7027 var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
7028 function diagonal(d, i) {
7029 var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
7030 x: p0.x,
7031 y: m
7032 }, {
7033 x: p3.x,
7034 y: m
7035 }, p3 ];
7036 p = p.map(projection);
7037 return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
7038 }
7039 diagonal.source = function(x) {
7040 if (!arguments.length) return source;
7041 source = d3_functor(x);

Callers

nothing calls this directly

Calls 1

callMethod · 0.45

Tested by

no test coverage detected