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

Function d3_layout_bundlePath

explainshell/web/static/js/d3.v3.js:5012–5024  ·  view source on GitHub ↗
(link)

Source from the content-addressed store, hash-verified

5010 };
5011 };
5012 function d3_layout_bundlePath(link) {
5013 var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
5014 while (start !== lca) {
5015 start = start.parent;
5016 points.push(start);
5017 }
5018 var k = points.length;
5019 while (end !== lca) {
5020 points.splice(k, 0, end);
5021 end = end.parent;
5022 }
5023 return points;
5024 }
5025 function d3_layout_bundleAncestors(node) {
5026 var ancestors = [], parent = node.parent;
5027 while (parent != null) {

Callers 1

d3.v3.jsFile · 0.85

Tested by

no test coverage detected