Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-zero-duration-transitions' i…
Browse files Browse the repository at this point in the history
…nto 3.3.6
  • Loading branch information
mbostock committed Sep 26, 2013
2 parents d2ad436 + 863f618 commit 328cd9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions d3.js
Expand Up @@ -7849,7 +7849,7 @@ d3 = function() {
++lock.count;
d3.timer(function(elapsed) {
var d = node.__data__, ease = transition.ease, delay = transition.delay, duration = transition.duration, tweened = [];
if (delay <= elapsed) return start(elapsed);
if (delay <= elapsed) return start(elapsed - delay);
d3_timer_replace(start, delay, time);
function start(elapsed) {
if (lock.active > id) return stop();
Expand All @@ -7860,12 +7860,12 @@ d3 = function() {
tweened.push(value);
}
});
if (tick(elapsed)) return 1;
d3_timer_replace(tick, 0, time);
if (tick(elapsed || 1)) return 1;
d3_timer_replace(tick, delay, time);
}
function tick(elapsed) {
if (lock.active !== id) return stop();
var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
var t = elapsed / duration, e = ease(t), n = tweened.length;
while (n > 0) {
tweened[--n].call(node, e);
}
Expand Down

0 comments on commit 328cd9f

Please sign in to comment.