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

Function d3_selection_style

explainshell/web/static/js/d3.v3.js:731–743  ·  view source on GitHub ↗
(name, value, priority)

Source from the content-addressed store, hash-verified

729 return this.each(d3_selection_style(name, value, priority));
730 };
731 function d3_selection_style(name, value, priority) {
732 function styleNull() {
733 this.style.removeProperty(name);
734 }
735 function styleConstant() {
736 this.style.setProperty(name, value, priority);
737 }
738 function styleFunction() {
739 var x = value.apply(this, arguments);
740 if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
741 }
742 return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
743 }
744 d3_selectionPrototype.property = function(name, value) {
745 if (arguments.length < 2) {
746 if (typeof name === "string") return this.node()[name];

Callers 1

d3.v3.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected