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

Function onFunction

external/.d3.js:4665–4678  ·  view source on GitHub ↗
(id, name, listener)

Source from the content-addressed store, hash-verified

4663}
4664
4665function onFunction(id, name, listener) {
4666 var on0, on1, sit = start(name) ? init : set;
4667 return function() {
4668 var schedule = sit(this, id),
4669 on = schedule.on;
4670
4671 // If this node shared a dispatch with the previous node,
4672 // just assign the updated shared dispatch and we’re done!
4673 // Otherwise, copy-on-write.
4674 if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
4675
4676 schedule.on = on1;
4677 };
4678}
4679
4680function transition_on(name, listener) {
4681 var id = this._id;

Callers 1

transition_onFunction · 0.85

Calls 1

startFunction · 0.85

Tested by

no test coverage detected