Skip to content

Commit

Permalink
fix: handling of touch on pgm-vo-mute-auto buttons without the need f…
Browse files Browse the repository at this point in the history
…or /?multitouch=1
  • Loading branch information
olzzon authored and olzzon committed Feb 14, 2020
1 parent 5863c1d commit d58fd1b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 34 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ The levels are:
localhost:1176 (or whatever ip you use for Sisyfos Nodejs/Docker)
IF you wan´t to disable settings:
localhost:1176/?settings=0
IF you´re using multitouch device:
localhost:1176/?multitouch=1
```

## Settings:
Expand Down
49 changes: 17 additions & 32 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,12 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
'on': this.props.fader.pgmOn,
'mute': this.props.fader.muteOn
})}
onClick={event => {
if (!window.location.search.includes('multitouch=1')) {
this.handlePgm();
}
onMouseUp={event => {
this.handlePgm();
}}
onTouchStart={event => {
if (window.location.search.includes('multitouch=1')) {
this.handlePgm()
}
onTouchEnd={event => {
event.preventDefault()
this.handlePgm()
}}
>
{this.props.fader.label != "" ? this.props.fader.label : ("CH " + (this.faderIndex + 1)) }
Expand All @@ -153,15 +150,11 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
'on': this.props.fader.voOn,
'mute': this.props.fader.muteOn,
})}
onClick={event => {
if (!window.location.search.includes('multitouch=1')) {
this.handleVo();
}
onMouseUp={event => {
this.handleVo();
}}
onTouchStart={event => {
if (window.location.search.includes('multitouch=1')) {
this.handleVo()
}
onTouchEnd={event => {
this.handleVo()
}}

>
Expand Down Expand Up @@ -229,15 +222,11 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
className={ClassNames("channel-ignore-button", {
'on': this.props.fader.ignoreAutomation
})}
onClick={event => {
if (!window.location.search.includes('multitouch=1')) {
this.handleIgnore();
}
onMouseUp={event => {
this.handleIgnore();
}}
onTouchStart={event => {
if (window.location.search.includes('multitouch=1')) {
this.handleIgnore()
}
onTouchEnd={event => {
this.handleIgnore()
}}
>
{this.props.fader.ignoreAutomation ? "MANUAL" : "AUTO"}
Expand All @@ -251,15 +240,11 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
className={ClassNames("channel-mute-button", {
'on': this.props.fader.muteOn
})}
onClick={event => {
if (!window.location.search.includes('multitouch=1')) {
this.handleMute();
}
onMouseUp={event => {
this.handleMute();
}}
onTouchStart={event => {
if (window.location.search.includes('multitouch=1')) {
this.handleMute()
}
onTouchEnd={event => {
this.handleMute()
}}
>
MUTE
Expand Down

0 comments on commit d58fd1b

Please sign in to comment.