Skip to content

Cancel pre-empted transitions synchronously. - #2600

Merged
mbostock merged 3 commits into
3.5.7from
cancel-timer
Oct 25, 2015
Merged

mbostock merged 3 commits into
3.5.7from
cancel-timer

Conversation

@mbostock

Copy link
Copy Markdown
Member

When a scheduled transition is pre-empted by a newer transition starting, we now cancel the old transition’s timers immediately, rather than waiting for the old transition to start.

TODO:

  • d3.timer should return void (at least until 3.6 or 4.0)
  • verify whether those errors can be thrown

When a scheduled transition is pre-empted by a newer transition starting, we now
cancel the old transition’s timers immediately, rather than waiting for the old
transition to start.

Fixes #2377. Related #2189.
@mbostock mbostock added this to the 3.5.7 milestone Oct 25, 2015
@mbostock mbostock added the bug Something isn’t working label Oct 25, 2015
@mbostock

Copy link
Copy Markdown
Member Author

Related #2377 #2189.

A transition can be scheduled and cancelled within a single tick.
For now, it’s internal-only. For 4.0, we’ll have a public API.
@mbostock

Copy link
Copy Markdown
Member Author

Related #2468, in that the new internal d3_timer API should provide a mechanism for the force layout to cancel its timer and avoid starting it twice.

@mbostock
mbostock merged commit a54137d into 3.5.7 Oct 25, 2015
@mbostock
mbostock deleted the cancel-timer branch October 25, 2015 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn’t working

Development

Successfully merging this pull request may close these issues.

1 participant