Skip to content

Commit 709b223

Browse files
committed
add wheel pointer cursor when not turning
1 parent bfca1c4 commit 709b223

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/components/panels/MinivacPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ export default function MinivacPanel({
532532
<RotaryKnob
533533
size={100}
534534
angle={simState?.motor.angle || 0}
535+
isInteractive={!simState?.motor.running}
535536
onChange={(newAngle) => {
536537
// Only allow manual control when motor is not running
537538
if (simulator && simState && !simState.motor.running) {

src/components/primitives/RotaryKnob.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ interface RotaryKnobProps {
66
onChange?: (angle: number) => void;
77
minAngle?: number;
88
maxAngle?: number;
9+
isInteractive?: boolean; // Show pointer cursor when draggable
910
}
1011

1112
export default function RotaryKnob({
1213
size = 80,
1314
angle: controlledAngle,
1415
onChange,
1516
minAngle = 0,
16-
maxAngle = 360
17+
maxAngle = 360,
18+
isInteractive = true
1719
}: RotaryKnobProps) {
1820
const [internalAngle, setInternalAngle] = useState(0);
1921
const [isDragging, setIsDragging] = useState(false);
@@ -78,7 +80,12 @@ export default function RotaryKnob({
7880
<div
7981
ref={knobRef}
8082
className="relative select-none"
81-
style={{ width: `${size}px`, height: `${size}px`, touchAction: 'none' }}
83+
style={{
84+
width: `${size}px`,
85+
height: `${size}px`,
86+
touchAction: 'none',
87+
cursor: isInteractive ? 'pointer' : 'default'
88+
}}
8289
onPointerDown={handlePointerDown}
8390
>
8491
{/* Base/shadow */}

0 commit comments

Comments
 (0)