Skip to content

Timer timerTick Signal only dispatched once when repeatCount = 0 #38

Description

@sgriffith

In randori.timer.Timer.prototype.onTimerTick, this.stop() is called at the end of the method, causing timerTick to only be issued once. Below is the code from randori-framework.js.

It seems that this.stop() should be moved into the if-statment.

randori.timer.Timer.prototype.onTimerTick = function() {
this._currentCount++;
this.timerTick.dispatch(this, this._currentCount);
if (this._currentCount == this._repeatCount) {
this.timerComplete.dispatch(this);
}
this.stop();
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions