mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
scroll fixing
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
|
||||||
<title>Roomba Rover</title>
|
<title>Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-B2-u-cpw.js"></script>
|
<script type="module" crossorigin src="/assets/index-Cn5NPWDD.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-LJWnKvT4.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-LJWnKvT4.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -103,9 +103,11 @@ export default function HornControl({
|
|||||||
const handleFreqWheel = useCallback(
|
const handleFreqWheel = useCallback(
|
||||||
(index) => (event) => {
|
(index) => (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
const direction = event.deltaY < 0 ? 1 : -1;
|
const direction = event.deltaY < 0 ? 1 : -1;
|
||||||
|
const step = 25;
|
||||||
const current = Number(freqs[index]) || 0;
|
const current = Number(freqs[index]) || 0;
|
||||||
updateFreq(index, current + direction);
|
updateFreq(index, current + direction * step);
|
||||||
},
|
},
|
||||||
[freqs, updateFreq],
|
[freqs, updateFreq],
|
||||||
);
|
);
|
||||||
@@ -210,6 +212,7 @@ export default function HornControl({
|
|||||||
step={1}
|
step={1}
|
||||||
value={freq}
|
value={freq}
|
||||||
onChange={(event) => updateFreq(idx, event.target.value)}
|
onChange={(event) => updateFreq(idx, event.target.value)}
|
||||||
|
onWheelCapture={handleFreqWheel(idx)}
|
||||||
onWheel={handleFreqWheel(idx)}
|
onWheel={handleFreqWheel(idx)}
|
||||||
className="w-full rounded border border-slate-700 bg-slate-900 px-1 py-[2px] text-right text-[0.65rem] font-mono text-slate-100"
|
className="w-full rounded border border-slate-700 bg-slate-900 px-1 py-[2px] text-right text-[0.65rem] font-mono text-slate-100"
|
||||||
/>
|
/>
|
||||||
@@ -240,6 +243,7 @@ export default function HornControl({
|
|||||||
step={1}
|
step={1}
|
||||||
value={freq}
|
value={freq}
|
||||||
onChange={(event) => updateFreq(idx, event.target.value)}
|
onChange={(event) => updateFreq(idx, event.target.value)}
|
||||||
|
onWheelCapture={handleFreqWheel(idx)}
|
||||||
onWheel={handleFreqWheel(idx)}
|
onWheel={handleFreqWheel(idx)}
|
||||||
className="w-full rounded border border-slate-700 bg-slate-900 px-1 py-[2px] text-right text-[0.65rem] font-mono text-slate-100"
|
className="w-full rounded border border-slate-700 bg-slate-900 px-1 py-[2px] text-right text-[0.65rem] font-mono text-slate-100"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user