Merge pull request #173 from UniversityRadioYork/mstratford-bit-of-a-drag

This commit is contained in:
Marks Polakovs 2020-11-02 18:50:38 +00:00 committed by GitHub
commit 0a81650d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,12 +18,14 @@ export default function ProModeButtons({ channel }: { channel: number }) {
<div className="row m-0 p-1 card-header channelButtons proMode hover-menu">
<span className="hover-label">Pro Mode&trade;</span>
{(activeButton === null || activeButton === "trim") && (
<button className="btn btn-warning" title="Trim">
<FaTachometerAlt
onClick={() =>
setActiveButton(activeButton === "trim" ? null : "trim")
}
/>
<button
className="btn btn-warning"
title="Trim"
onClick={() =>
setActiveButton(activeButton === "trim" ? null : "trim")
}
>
<FaTachometerAlt />
</button>
)}
{activeButton === "trim" && (
@ -35,9 +37,10 @@ export default function ProModeButtons({ channel }: { channel: number }) {
max={12}
step={0.2}
value={trimVal.toFixed(1)}
onChange={(e) =>
dispatch(setChannelTrim(channel, parseFloat(e.target.value)))
}
onChange={(e) => {
dispatch(setChannelTrim(channel, parseFloat(e.target.value)));
e.target.blur(); // Stop dragging from disabling the keyboard triggers.
}}
/>
<b>{trimVal} dB</b>
</>