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

Function interrupt

external/.d3.js:4319–4340  ·  view source on GitHub ↗
(node, name)

Source from the content-addressed store, hash-verified

4317}
4318
4319function interrupt(node, name) {
4320 var schedules = node.__transition,
4321 schedule,
4322 active,
4323 empty = true,
4324 i;
4325
4326 if (!schedules) return;
4327
4328 name = name == null ? null : name + "";
4329
4330 for (i in schedules) {
4331 if ((schedule = schedules[i]).name !== name) { empty = false; continue; }
4332 active = schedule.state > STARTING && schedule.state < ENDING;
4333 schedule.state = ENDED;
4334 schedule.timer.stop();
4335 schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
4336 delete schedules[i];
4337 }
4338
4339 if (empty) delete node.__transition;
4340}
4341
4342function selection_interrupt(name) {
4343 return this.each(function() {

Callers 6

selection_interruptFunction · 0.85
brush$1Function · 0.85
startedFunction · 0.85
wheeledFunction · 0.85
mousedownedFunction · 0.85
touchstartedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected