mbostock/d3 — Issue #492: Transition/Duration - Convenience Function
Author: the-jxc
Created: 2012-02-07 03:01:26+00:00
State: open

The following convenience function would be great. It would allow the programmer to write one piece of code which would very efficiently support the zero duration transition case without incurring the overheard of timers or other additional processing.

function transition (selection, duration) {
return duration ? selection.transition(duration) : selection;
}