fix(polygon): focus runs on operator playback
This commit is contained in:
@@ -88,17 +88,17 @@ function frameColors(
|
||||
setRgb(
|
||||
colors,
|
||||
offset,
|
||||
groundTruth ? 0.78 : 0.29,
|
||||
groundTruth ? 0.9 : 0.33,
|
||||
groundTruth ? 0.42 : 0.38,
|
||||
groundTruth ? 0.76 : 0.29,
|
||||
groundTruth ? 0.86 : 0.33,
|
||||
groundTruth ? 0.52 : 0.36,
|
||||
);
|
||||
} else if (mode === "current") {
|
||||
setRgb(
|
||||
colors,
|
||||
offset,
|
||||
current ? 0.73 : 0.29,
|
||||
current ? 1 : 0.36,
|
||||
current ? 0.29 : 0.43,
|
||||
current ? 0.88 : 0.29,
|
||||
current ? 0.68 : 0.34,
|
||||
current ? 0.28 : 0.37,
|
||||
);
|
||||
} else if (mode === "candidate") {
|
||||
if (!candidateAssigned) {
|
||||
@@ -107,9 +107,9 @@ function frameColors(
|
||||
setRgb(
|
||||
colors,
|
||||
offset,
|
||||
candidate ? 0.24 : 0.29,
|
||||
candidate ? 0.84 : 0.36,
|
||||
candidate ? 1 : 0.43,
|
||||
candidate ? 0.78 : 0.29,
|
||||
candidate ? 0.91 : 0.34,
|
||||
candidate ? 0.48 : 0.37,
|
||||
);
|
||||
}
|
||||
} else if (mode === "disagreement") {
|
||||
@@ -131,7 +131,7 @@ function frameColors(
|
||||
disagreement ? 0.22 : 0.35,
|
||||
);
|
||||
} else {
|
||||
setRgb(colors, offset, candidate ? 0.24 : 0.29, candidate ? 0.84 : 0.36, 0.43);
|
||||
setRgb(colors, offset, candidate ? 0.78 : 0.29, candidate ? 0.91 : 0.34, 0.4);
|
||||
}
|
||||
}
|
||||
return colors;
|
||||
|
||||
@@ -430,6 +430,41 @@ export function PolygonRunWorkspace({ route }: PolygonRunWorkspaceProps) {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div className="polygon-review-controls">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={playing ? "Пауза" : "Воспроизвести"}
|
||||
onClick={() => setPlaying((value) => !value)}
|
||||
>
|
||||
{playing ? "Пауза" : "Play"}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Предыдущий кадр"
|
||||
disabled={selectedPosition <= 0}
|
||||
onClick={() => selectPosition(selectedPosition - 1)}
|
||||
>
|
||||
←
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Следующий кадр"
|
||||
disabled={selectedPosition >= orderedFrames.length - 1}
|
||||
onClick={() => selectPosition(selectedPosition + 1)}
|
||||
>
|
||||
→
|
||||
</button>
|
||||
<input
|
||||
type="range"
|
||||
min={0}
|
||||
max={Math.max(0, orderedFrames.length - 1)}
|
||||
value={selectedPosition}
|
||||
aria-label="Позиция в записи"
|
||||
onChange={(event) => selectPosition(Number(event.target.value))}
|
||||
/>
|
||||
<span>{selectedPosition + 1} / {orderedFrames.length}</span>
|
||||
</div>
|
||||
|
||||
<div className="polygon-review-stage">
|
||||
{scene ? (
|
||||
<LidarGroundPointCloud frame={scene} mode={reviewMode} />
|
||||
@@ -469,41 +504,6 @@ export function PolygonRunWorkspace({ route }: PolygonRunWorkspaceProps) {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div className="polygon-review-controls">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={playing ? "Пауза" : "Воспроизвести"}
|
||||
onClick={() => setPlaying((value) => !value)}
|
||||
>
|
||||
{playing ? "Пауза" : "Play"}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Предыдущий кадр"
|
||||
disabled={selectedPosition <= 0}
|
||||
onClick={() => selectPosition(selectedPosition - 1)}
|
||||
>
|
||||
←
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Следующий кадр"
|
||||
disabled={selectedPosition >= orderedFrames.length - 1}
|
||||
onClick={() => selectPosition(selectedPosition + 1)}
|
||||
>
|
||||
→
|
||||
</button>
|
||||
<input
|
||||
type="range"
|
||||
min={0}
|
||||
max={Math.max(0, orderedFrames.length - 1)}
|
||||
value={selectedPosition}
|
||||
aria-label="Позиция в записи"
|
||||
onChange={(event) => selectPosition(Number(event.target.value))}
|
||||
/>
|
||||
<span>{selectedPosition + 1} / {orderedFrames.length}</span>
|
||||
</div>
|
||||
|
||||
<div className="polygon-review-order">
|
||||
<div>
|
||||
{orderLabels.map(([order, label]) => (
|
||||
|
||||
Reference in New Issue
Block a user