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

Function createElementWithAttributes

chapter24/docs/d3-graphviz.js:191–201  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

189 }
190 }
191 function createElementWithAttributes(data) {
192 var elementNode = createElement(data);
193 var element = d3__namespace.select(elementNode);
194 var attributes = data.attributes;
195 for (var _i = 0, _Object$keys = Object.keys(attributes); _i < _Object$keys.length; _i++) {
196 var attributeName = _Object$keys[_i];
197 var attributeValue = attributes[attributeName];
198 element.attr(attributeName, attributeValue);
199 }
200 return elementNode;
201 }
202 function replaceElement(element, data) {
203 var parent = d3__namespace.select(element.node().parentNode);
204 var newElementNode = createElementWithAttributes(data);

Callers 2

replaceElementFunction · 0.70
calculatePathTweenPointsFunction · 0.70

Calls 1

createElementFunction · 0.70

Tested by

no test coverage detected