mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 02:13:48 +00:00
feat: reload on change
This commit is contained in:
@@ -54,7 +54,7 @@ class Timer {
|
||||
if (!this.showNegative) {
|
||||
this.current = Math.max(this._finishAt + this._pausedTotal - now, 0);
|
||||
} else {
|
||||
(this.current = this._finishAt + this._pausedTotal - now), 0;
|
||||
this.current = this._finishAt + this._pausedTotal - now;
|
||||
}
|
||||
break;
|
||||
case 'pause':
|
||||
@@ -99,6 +99,11 @@ class Timer {
|
||||
this._pausedTotal = null;
|
||||
}
|
||||
|
||||
// get elapsed time
|
||||
getElapsed() {
|
||||
return this.duration - this.current;
|
||||
}
|
||||
|
||||
// getObject
|
||||
getObject() {
|
||||
this.update();
|
||||
@@ -142,7 +147,6 @@ class Timer {
|
||||
pause() {
|
||||
// do we need to change
|
||||
if (this.state === 'pause') return;
|
||||
|
||||
else if (this.duration === 0) return;
|
||||
|
||||
// update pause time
|
||||
|
||||
Reference in New Issue
Block a user