* fix/102 improve osx feedback on navigation
* fix/102 refactor enable / disable OSC in
This commit is contained in:
Carlos Valente
2022-04-10 10:05:35 +02:00
committed by GitHub
parent 67ddcd8c68
commit b01145ca4b
2 changed files with 17 additions and 19 deletions
@@ -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'>
+17 -18
View File
@@ -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() {