Skip to content

Commit

Permalink
fix: multiple mixers - assign channels to fader only assigned first m…
Browse files Browse the repository at this point in the history
…ixer
  • Loading branch information
olzzon authored and olzzon committed Oct 9, 2020
1 parent 921be2d commit 2086754
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions client/components/ChannelRouteSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,21 @@ class ChannelRouteSettings extends React.PureComponent<
this.faderIndex = this.props.faderIndex
}

handleAssignChannel(channel: number, event: any) {
handleAssignChannel(mixerIndex: number, channel: number, event: any) {
if (event.target.checked === false) {
console.log('Unbinding Channel')
if (
window.confirm(
'Unbind Channel ' +
'Unbind Mixer ' +
String(mixerIndex + 1) +
' Channel ' +
String(channel + 1) +
' from Fader ' +
String(this.faderIndex + 1)
)
) {
window.socketIoClient.emit(SOCKET_SET_ASSIGNED_FADER, {
mixerIndex: 0,
mixerIndex: mixerIndex,
channel: channel,
faderAssign: -1,
})
Expand All @@ -52,15 +54,17 @@ class ChannelRouteSettings extends React.PureComponent<
console.log('Binding Channel')
if (
window.confirm(
'Bind Channel ' +
'Bind Mixer ' +
String(mixerIndex + 1) +
' Channel ' +
String(channel + 1) +
' to Fader ' +
String(this.faderIndex + 1) +
'?'
)
) {
window.socketIoClient.emit(SOCKET_SET_ASSIGNED_FADER, {
mixerIndex: 0,
mixerIndex: mixerIndex,
channel: channel,
faderAssign: this.faderIndex,
})
Expand Down Expand Up @@ -143,6 +147,7 @@ class ChannelRouteSettings extends React.PureComponent<
}
onChange={(event) =>
this.handleAssignChannel(
mixerIndex,
index,
event
)
Expand Down

0 comments on commit 2086754

Please sign in to comment.