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

Function _render

chapter24/docs/d3-graphviz.js:449–747  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

447 return this;
448 }
449 function _render(callback) {
450 var transitionInstance = this._transition;
451 var fade = this._options.fade && transitionInstance != null;
452 var tweenPaths = this._options.tweenPaths;
453 var tweenShapes = this._options.tweenShapes;
454 var convertEqualSidedPolygons = this._options.convertEqualSidedPolygons;
455 var growEnteringEdges = this._options.growEnteringEdges && transitionInstance != null;
456 var attributer = this._attributer;
457 var graphvizInstance = this;
458 function insertChildren(element) {
459 var children = element.selectAll(function () {
460 return element.node().childNodes;
461 });
462 children = children.data(function (d) {
463 return d.children;
464 }, function (d) {
465 return d.key;
466 });
467 var childrenEnter = children.enter().append(function (d) {
468 var element = createElement(d);
469 if (d.tag == '#text' && fade) {
470 element.nodeValue = d.text;
471 }
472 return element;
473 });
474 if (fade || growEnteringEdges && isEdgeElementParent(element.datum())) {
475 var childElementsEnter = childrenEnter.filter(function (d) {
476 return d.tag[0] == '#' ? null : this;
477 }).each(function (d) {
478 var childEnter = d3__namespace.select(this);
479 for (var _i = 0, _Object$keys = Object.keys(d.attributes); _i < _Object$keys.length; _i++) {
480 var attributeName = _Object$keys[_i];
481 var attributeValue = d.attributes[attributeName];
482 childEnter.attr(attributeName, attributeValue);
483 }
484 });
485 childElementsEnter.filter(function (d) {
486 return d.tag == 'svg' || d.tag == 'g' ? null : this;
487 }).style("opacity", 0.0);
488 }
489 var childrenExit = children.exit();
490 if (attributer) {
491 childrenExit.each(attributer);
492 }
493 if (transitionInstance) {
494 childrenExit = childrenExit.transition(transitionInstance);
495 if (fade) {
496 childrenExit.filter(function (d) {
497 return d.tag[0] == '#' ? null : this;
498 }).style("opacity", 0.0);
499 }
500 }
501 childrenExit = childrenExit.remove();
502 children = childrenEnter.merge(children).order();
503 children.each(attributeElement);
504 }
505 function attributeElement(data) {
506 var element = d3__namespace.select(this);

Callers

nothing calls this directly

Calls 6

pushMethod · 0.45
onMethod · 0.45
renderMethod · 0.45
callMethod · 0.45
mergeMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected