feat(map): control ghost pin movement speed
This commit is contained in:
@@ -59,6 +59,27 @@ export function GhostPinSettingsPanel({
|
||||
return current;
|
||||
})}
|
||||
/>
|
||||
<RangeControl
|
||||
label="Максимальная скорость"
|
||||
value={configuration.maximumSpeedMetersPerSecond}
|
||||
min={1}
|
||||
max={100}
|
||||
step={1}
|
||||
formatValue={(value) => `${value} м/с`}
|
||||
onChange={(maximumSpeedMetersPerSecond) => updateDraft((current) => {
|
||||
current.view.ghostPins.maximumSpeedMetersPerSecond =
|
||||
maximumSpeedMetersPerSecond;
|
||||
current.view.ghostPins.positions =
|
||||
current.view.ghostPins.positions.map((pin) => ({
|
||||
...pin,
|
||||
speedMetersPerSecond: Math.min(
|
||||
pin.speedMetersPerSecond,
|
||||
maximumSpeedMetersPerSecond,
|
||||
),
|
||||
}));
|
||||
return current;
|
||||
})}
|
||||
/>
|
||||
<Checker
|
||||
label="Симуляция движения"
|
||||
checked={configuration.simulationEnabled}
|
||||
|
||||
Reference in New Issue
Block a user