mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 22:49:18 +00:00
bugfix: paused time not reset
This commit is contained in:
@@ -605,6 +605,7 @@ class EventTimer extends Timer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goto(eventIndex) {
|
goto(eventIndex) {
|
||||||
|
// load event
|
||||||
this.loadEvent(eventIndex);
|
this.loadEvent(eventIndex);
|
||||||
|
|
||||||
// broadcast current state
|
// broadcast current state
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ class Timer {
|
|||||||
if (this.state === 'start') return;
|
if (this.state === 'start') return;
|
||||||
else if (this.duration === 0) return;
|
else if (this.duration === 0) return;
|
||||||
else if (this.startedAt == null) {
|
else if (this.startedAt == null) {
|
||||||
|
this._resetTimers();
|
||||||
const now = this._getCurrentTime();
|
const now = this._getCurrentTime();
|
||||||
this._startedAt = now;
|
this._startedAt = now;
|
||||||
this._finishAt = now + this.duration;
|
this._finishAt = now + this.duration;
|
||||||
|
|||||||
Reference in New Issue
Block a user