MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / drawEdge

Function drawEdge

chapter19/docs/d3-graphviz.js:1435–1459  ·  view source on GitHub ↗
(x1, y1, x2, y2, attributes)

Source from the content-addressed store, hash-verified

1433 }
1434
1435 function drawEdge(x1, y1, x2, y2, attributes) {
1436 var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
1437 attributes = Object.assign({}, attributes);
1438 if (attributes.style && attributes.style.includes('invis')) {
1439 var newEdge = d3__namespace.select(null);
1440 } else {
1441 var root = this._selection;
1442 var svg = root.selectWithoutDataPropagation("svg");
1443 var graph0 = svg.selectWithoutDataPropagation("g");
1444 var newEdge0 = createEdge.call(this, attributes);
1445 var edgeData = extractAllElementsData(newEdge0);
1446 var newEdge = graph0.append('g').data([edgeData]);
1447 attributeElement.call(newEdge.node(), edgeData);
1448 _updateEdge.call(this, newEdge, x1, y1, x2, y2, attributes, options);
1449 }
1450 this._drawnEdge = {
1451 g: newEdge,
1452 x1: x1,
1453 y1: y1,
1454 x2: x2,
1455 y2: y2,
1456 attributes: attributes
1457 };
1458 return this;
1459 }
1460 function updateDrawnEdge(x1, y1, x2, y2) {
1461 var attributes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
1462 var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};

Callers

nothing calls this directly

Calls 3

extractAllElementsDataFunction · 0.70
callMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected