mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +00:00
create addTime function in simple timer (#1363)
* create addTime function in simple timer
This commit is contained in:
committed by
GitHub
parent
e6aa7404f7
commit
607bc40673
@@ -1,4 +1,4 @@
|
||||
import { SimpleDirection, SimpleTimerState } from 'ontime-types';
|
||||
import { SimpleDirection, SimplePlayback, SimpleTimerState } from 'ontime-types';
|
||||
|
||||
import { SimpleTimer } from '../../classes/simple-timer/SimpleTimer.js';
|
||||
import { eventStore } from '../../stores/EventStore.js';
|
||||
@@ -59,7 +59,11 @@ export class AuxTimerService {
|
||||
|
||||
@broadcastReturn
|
||||
addTime(millis: number) {
|
||||
return this.timer.setTime(this.timer.state.current + millis);
|
||||
if (this.timer.state.playback === SimplePlayback.Start) {
|
||||
this.timer.addTime(millis);
|
||||
return this.timer.update(this.getTime());
|
||||
}
|
||||
return this.timer.addTime(millis);
|
||||
}
|
||||
|
||||
@broadcastReturn
|
||||
|
||||
Reference in New Issue
Block a user