MCPcopy Create free account
hub / github.com/breck7/scroll / styleFunction

Function styleFunction

external/.d3.js:4779–4792  ·  view source on GitHub ↗
(name, interpolate, value)

Source from the content-addressed store, hash-verified

4777}
4778
4779function styleFunction(name, interpolate, value) {
4780 var string00,
4781 string10,
4782 interpolate0;
4783 return function() {
4784 var string0 = styleValue(this, name),
4785 value1 = value(this),
4786 string1 = value1 + "";
4787 if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
4788 return string0 === string1 ? null
4789 : string0 === string00 && string1 === string10 ? interpolate0
4790 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
4791 };
4792}
4793
4794function styleMaybeRemove(id, name) {
4795 var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;

Callers 1

transition_styleFunction · 0.85

Calls 2

styleValueFunction · 0.85
interpolateFunction · 0.85

Tested by

no test coverage detected