Skip to content

Commit

Permalink
fix: update fader handle color on state shift
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Feb 14, 2020
1 parent 5796eec commit e149456
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,18 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}

fader() {
let thumb = 'channel-volume-thumb' + (this.props.fader.pgmOn ? '-color-pgm' : '') + (this.props.fader.voOn ? '-color-vo' : '')
if (this.props.fader.muteOn) {
thumb = 'channel-volume-thumb-color-mute'
}
return (
<Nouislider
className={
ClassNames(
{
'channel-volume-fader': true,
"noUi-vertical": true,
"pgm-on": this.props.fader.pgmOn,
"vo-on": this.props.fader.voOn,
"mute-on": this.props.fader.muteOn,
"ignore-on": this.props.fader.ignoreAutomation,
}
)
}
orientation="vertical"
animate={false}

range={{ min: 0, max: 1 }}
start={[this.props.fader.faderLevel]}
connect
Expand Down Expand Up @@ -283,6 +274,8 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
className={
ClassNames("channel-body", {
"with-pfl": this.props.settings.showPfl,
"pgm-on": this.props.fader.pgmOn,
"vo-on": this.props.fader.voOn,
"mute-on": this.props.fader.muteOn,
"ignore-on": this.props.fader.ignoreAutomation,
})}>
Expand Down

0 comments on commit e149456

Please sign in to comment.