diff --git a/ui/src/parts/range_annotator.tsx b/ui/src/parts/range_annotator.tsx index d6e81e0147..dcb2869e51 100644 --- a/ui/src/parts/range_annotator.tsx +++ b/ui/src/parts/range_annotator.tsx @@ -195,7 +195,7 @@ const itemsToAnnotations = (items?: AudioAnnotatorItem[]) => { return items?.map(i => ({ ...i, id: xid(), canvasHeight: WAVEFORM_HEIGHT, canvasY: 0, canvasStart: i.start, canvasEnd: i.end })) || [] }, - needsZoom = (duration: F) => duration > 120, + needsZoom = (duration: F) => duration > 10, drawAnnotation = (ctx: CanvasRenderingContext2D, { tag, canvasStart, canvasEnd, canvasHeight, canvasY, isFocused }: DrawnAnnotation, colorsMap: Map) => { ctx.fillStyle = colorsMap.get(tag)?.transparent || 'red' ctx.fillRect(canvasStart, canvasY, canvasEnd - canvasStart, canvasHeight) @@ -664,40 +664,43 @@ export const /> {onRenderToolbar && onRenderToolbar()} - - - - {needsZoom(duration) && ( -
- {annotatorContainerRef.current && ( +
+ { + annotatorContainerRef.current && ( - + - )} -
- )} + ) + } +
+ {needsZoom(duration) && ( + + + + ) + } ) }