MCPcopy
hub / github.com/csev/py4e / d3_selection_property

Function d3_selection_property

code/gmane/d3.v3.js:767–779  ·  view source on GitHub ↗
(name, value)

Source from the content-addressed store, hash-verified

765 return this.each(d3_selection_property(name, value));
766 };
767 function d3_selection_property(name, value) {
768 function propertyNull() {
769 delete this[name];
770 }
771 function propertyConstant() {
772 this[name] = value;
773 }
774 function propertyFunction() {
775 var x = value.apply(this, arguments);
776 if (x == null) delete this[name]; else this[name] = x;
777 }
778 return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
779 }
780 d3_selectionPrototype.text = function(value) {
781 return arguments.length ? this.each(typeof value === "function" ? function() {
782 var v = value.apply(this, arguments);

Callers 1

d3.v3.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected