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

Function tweenRemove

external/.d3.js:4348–4370  ·  view source on GitHub ↗
(id, name)

Source from the content-addressed store, hash-verified

4346}
4347
4348function tweenRemove(id, name) {
4349 var tween0, tween1;
4350 return function() {
4351 var schedule = set(this, id),
4352 tween = schedule.tween;
4353
4354 // If this node shared tween with the previous node,
4355 // just assign the updated shared tween and we’re done!
4356 // Otherwise, copy-on-write.
4357 if (tween !== tween0) {
4358 tween1 = tween0 = tween;
4359 for (var i = 0, n = tween1.length; i < n; ++i) {
4360 if (tween1[i].name === name) {
4361 tween1 = tween1.slice();
4362 tween1.splice(i, 1);
4363 break;
4364 }
4365 }
4366 }
4367
4368 schedule.tween = tween1;
4369 };
4370}
4371
4372function tweenFunction(id, name, value) {
4373 var tween0, tween1;

Callers

nothing calls this directly

Calls 2

setFunction · 0.85
sliceMethod · 0.80

Tested by

no test coverage detected