Skip to content

Commit

Permalink
feat: full ch strip - set draggrid to 20x20 for better performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Nov 2, 2020
1 parent f16d418 commit b243a71
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/components/ChanStripFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import ReductionMeter from './ReductionMeter'
import ClassNames from 'classnames'
import { fxParamsList } from '../../server/constants/MixerProtocolInterface'
import { IChannel } from '../../server/reducers/channelsReducer'
import { storeFaderFx } from '../../server/reducers/faderActions'

interface IChanStripFullInjectProps {
label: string
Expand Down Expand Up @@ -143,6 +144,7 @@ class ChanStripFull extends React.PureComponent<
handleFx(fxParam: fxParamsList, level: any) {
if (level < 0) { level = 0}
if (level > 1) { level = 1}
// window.storeRedux.dispatch(storeFaderFx(fxParam, this.props.faderIndex, parseFloat(level)))
window.socketIoClient.emit(SOCKET_SET_FX, {
fxParam: fxParam,
channel: this.props.faderIndex,
Expand Down Expand Up @@ -284,21 +286,21 @@ class ChanStripFull extends React.PureComponent<
x: this.valueToFreqPosition(
this.props.fader[this.props.faderIndex][
eqFreqKey
]?.[0] ?? 0
]?.[0]
),
y:
EQ_Y_SIZE -
(this.props.fader[
this.props.faderIndex
][fxParamsList[fxKey]]?.[0] ?? 0) *
][fxParamsList[fxKey]]?.[0]) *
EQ_Y_SIZE,
}}
grid={[1, 1]}
grid={[20, 20]}
scale={100}
onDrag={(event) =>
this.handleDragCaptureEq(
fxParamsList[fxKey],
event as MouseEvent
event
)
}
>
Expand Down

0 comments on commit b243a71

Please sign in to comment.