Scroll amount now 1/1000th while pressing "shift"

This commit is contained in:
FlorianZahn
2021-10-04 04:24:14 +02:00
committed by GitHub
parent 620e75517c
commit 4de55ea5fe

View File

@@ -248,7 +248,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
} }
changeTimesWhenScrolling(index: number, e: React.WheelEvent, sponsorTime: SponsorTime): void { changeTimesWhenScrolling(index: number, e: React.WheelEvent, sponsorTime: SponsorTime): void {
const step = 0.01; const step = (e.shiftKey) ? 0.001 : 0.01;
const sponsorTimeEdits = this.state.sponsorTimeEdits; const sponsorTimeEdits = this.state.sponsorTimeEdits;
let timeAsNumber = utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[index]); let timeAsNumber = utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[index]);
if (timeAsNumber !== null && e.deltaY != 0) { if (timeAsNumber !== null && e.deltaY != 0) {