Skip to content

Cancel a scheduled timer? #5

Closed

Description

@mbostock

See d3/d3#2189.

Probably timer(…) should return a handle so that a timer can be cancelled, like setTimeout & clearTimeout.

Activity

  1. mbostock commented on Oct 22, 2015

    @mbostock
    MemberAuthor

    Having a timer handle might also present a cleaner API to timerReplace, rather than having it only work on the current timer. It also means we don’t have to track the active timer.

  2. mbostock commented on Oct 23, 2015

    @mbostock
    MemberAuthor

    Related d3/d3#2468, in that starting and stopping the force layout’s timer is easier when you can cancel the timer externally.

  3. mbostock commented on Oct 23, 2015

    @mbostock
    MemberAuthor

    If timer(…) returns a handle and that handle can be used to stop a timer, should we still allow the callback to return true for canceling a timer?

  4. added a commit that references this issue on Nov 1, 2015
    16f0ffd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions