mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 16:03:52 +00:00
Fix/102 (#106)
* fix/102 improve osx feedback on navigation * fix/102 refactor enable / disable OSC in
This commit is contained in:
@@ -169,7 +169,6 @@ export default function OscSettingsModal() {
|
||||
active={formData.enabled}
|
||||
text={formData.enabled ? 'OSC IN Enabled' : 'OSC IN Disabled'}
|
||||
actionHandler={() => handleChange('enabled', !formData.enabled)}
|
||||
onClick={() => console.log('yay')}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl id='portIn'>
|
||||
|
||||
@@ -336,8 +336,11 @@ export class EventTimer extends Timer {
|
||||
case 'onPause':
|
||||
// broadcast current state
|
||||
this.broadcastState();
|
||||
|
||||
// send OSC
|
||||
this.sendOsc(this.osc.implemented.pause);
|
||||
if (this.prevCycle === this.cycleState.onUpdate) {
|
||||
this.sendOsc(this.osc.implemented.pause);
|
||||
}
|
||||
|
||||
// check integrations - http
|
||||
if (h?.onLoad?.enabled) {
|
||||
@@ -1278,9 +1281,12 @@ export class EventTimer extends Timer {
|
||||
if (this.selectedEventIndex === 0) return;
|
||||
|
||||
// if there is no event running, go to first
|
||||
if (this.selectedEventIndex == null) {
|
||||
if (!this.selectedEventIndex) {
|
||||
this.loadEvent(0);
|
||||
return;
|
||||
} else {
|
||||
const gotoEvent = this.selectedEventIndex > 0 ? this.selectedEventIndex - 1 : 0;
|
||||
if (gotoEvent === this.selectedEventIndex) return;
|
||||
this.loadEvent(gotoEvent);
|
||||
}
|
||||
|
||||
// send OSC
|
||||
@@ -1288,11 +1294,6 @@ export class EventTimer extends Timer {
|
||||
|
||||
// change playstate
|
||||
this.pause();
|
||||
|
||||
const gotoEvent = this.selectedEventIndex > 0 ? this.selectedEventIndex - 1 : 0;
|
||||
|
||||
if (gotoEvent === this.selectedEventIndex) return;
|
||||
this.loadEvent(gotoEvent);
|
||||
}
|
||||
|
||||
next() {
|
||||
@@ -1303,9 +1304,15 @@ export class EventTimer extends Timer {
|
||||
if (this.selectedEventIndex === this.numEvents - 1) return;
|
||||
|
||||
// if there is no event running, go to first
|
||||
if (this.selectedEventIndex == null) {
|
||||
if (!this.selectedEventIndex) {
|
||||
this.loadEvent(0);
|
||||
return;
|
||||
} else {
|
||||
const gotoEvent =
|
||||
this.selectedEventIndex < this.numEvents - 1
|
||||
? this.selectedEventIndex + 1
|
||||
: this.numEvents - 1;
|
||||
if (gotoEvent === this.selectedEventIndex) return;
|
||||
this.loadEvent(gotoEvent);
|
||||
}
|
||||
|
||||
// send OSC
|
||||
@@ -1313,14 +1320,6 @@ export class EventTimer extends Timer {
|
||||
|
||||
// change playstate
|
||||
this.pause();
|
||||
|
||||
const gotoEvent =
|
||||
this.selectedEventIndex < this.numEvents - 1
|
||||
? this.selectedEventIndex + 1
|
||||
: this.numEvents - 1;
|
||||
|
||||
if (gotoEvent === this.selectedEventIndex) return;
|
||||
this.loadEvent(gotoEvent);
|
||||
}
|
||||
|
||||
unload() {
|
||||
|
||||
Reference in New Issue
Block a user