fix little things blur

This commit is contained in:
LorenzoLancia
2026-04-08 22:43:30 +02:00
parent f6b7c463f0
commit 38d72217c2
2 changed files with 14 additions and 5 deletions
+13 -4
View File
@@ -1028,8 +1028,17 @@ export default function VideoEditor() {
return updatedRegion;
}),
}));
if (type === "blur" && selectedAnnotationId === id) {
setSelectedAnnotationId(null);
setSelectedBlurId(id);
setSelectedSpeedId(null);
} else if (type !== "blur" && selectedBlurId === id) {
setSelectedBlurId(null);
setSelectedAnnotationId(id);
}
},
[pushState],
[pushState, selectedAnnotationId, selectedBlurId],
);
const handleAnnotationStyleChange = useCallback(
@@ -1212,14 +1221,14 @@ export default function VideoEditor() {
useEffect(() => {
if (
selectedAnnotationId &&
!annotationRegions.some((region) => region.id === selectedAnnotationId)
!annotationOnlyRegions.some((region) => region.id === selectedAnnotationId)
) {
setSelectedAnnotationId(null);
}
if (selectedBlurId && !annotationRegions.some((region) => region.id === selectedBlurId)) {
if (selectedBlurId && !blurRegions.some((region) => region.id === selectedBlurId)) {
setSelectedBlurId(null);
}
}, [selectedAnnotationId, selectedBlurId, annotationRegions]);
}, [selectedAnnotationId, selectedBlurId, annotationOnlyRegions, blurRegions]);
useEffect(() => {
if (selectedSpeedId && !speedRegions.some((region) => region.id === selectedSpeedId)) {
@@ -14,7 +14,7 @@ interface ItemProps {
onSelect?: () => void;
zoomDepth?: number;
speedValue?: number;
variant?: "zoom" | "trim" | "annotation" | "speed";
variant?: "zoom" | "trim" | "annotation" | "speed" | "blur";
}
// Map zoom depth to multiplier labels