refactor: rename position handlers to startPoint and endPoint for clarity; update toggle UI logic to use localStorage
This commit is contained in:
@@ -45,11 +45,11 @@ const VehicleMechanics: React.FC = () => {
|
||||
setSimulationPaths(updatedPaths);
|
||||
}, [selectedActionSphere?.point?.uuid, simulationPaths, setSimulationPaths]);
|
||||
|
||||
const handleStartPositionChange = React.useCallback((position: string) => {
|
||||
const handleStartPointChange = React.useCallback((position: string) => {
|
||||
handleActionUpdate({ start: position });
|
||||
}, [handleActionUpdate]);
|
||||
|
||||
const handleEndPositionChange = React.useCallback((position: string) => {
|
||||
const handleEndPointChange = React.useCallback((position: string) => {
|
||||
handleActionUpdate({ end: position });
|
||||
}, [handleActionUpdate]);
|
||||
|
||||
@@ -94,16 +94,16 @@ const VehicleMechanics: React.FC = () => {
|
||||
<>
|
||||
<EyeDropInput
|
||||
key={`start-${selectedPoint.uuid}`}
|
||||
label="Start Position"
|
||||
label="Start Point"
|
||||
value={selectedPoint.actions.start}
|
||||
onChange={handleStartPositionChange}
|
||||
onChange={handleStartPointChange}
|
||||
/>
|
||||
|
||||
<EyeDropInput
|
||||
key={`end-${selectedPoint.uuid}`}
|
||||
label="End Position"
|
||||
label="End Point"
|
||||
value={selectedPoint.actions.end}
|
||||
onChange={handleEndPositionChange}
|
||||
onChange={handleEndPointChange}
|
||||
/>
|
||||
|
||||
<InputWithDropDown
|
||||
|
||||
Reference in New Issue
Block a user