Skip to content

Commit

Permalink
fix: don´t toggle both on touch & click if multitouch is off
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzons-mac authored and olzzons-mac committed Feb 13, 2020
1 parent 64a3d36 commit 1b46a47
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,19 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}
return (
<Nouislider
className="channel-volume-fader"
className={
ClassNames(
{
'channel-volume-fader': 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 }}
Expand All @@ -111,15 +123,6 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}}
/>
)
/*
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 (
className="channel-volume-fader"
thumbClassName = { thumb }
*/
}


Expand All @@ -137,7 +140,9 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}
}}
onTouchStart={event => {
this.handlePgm();
if (window.location.search.includes('multitouch=1')) {
this.handlePgm()
}
}}
>
{this.props.fader.label != "" ? this.props.fader.label : ("CH " + (this.faderIndex + 1)) }
Expand All @@ -160,7 +165,9 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}
}}
onTouchStart={event => {
this.handleVo();
if (window.location.search.includes('multitouch=1')) {
this.handleVo()
}
}}

>
Expand Down Expand Up @@ -234,7 +241,9 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}
}}
onTouchStart={event => {
this.handleIgnore();
if (window.location.search.includes('multitouch=1')) {
this.handleIgnore()
}
}}
>
{this.props.fader.ignoreAutomation ? "MANUAL" : "AUTO"}
Expand All @@ -254,7 +263,9 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
}
}}
onTouchStart={event => {
this.handleMute();
if (window.location.search.includes('multitouch=1')) {
this.handleMute()
}
}}
>
MUTE
Expand Down

0 comments on commit 1b46a47

Please sign in to comment.