diff --git a/src/components/three/ModelViewer.tsx b/src/components/three/ModelViewer.tsx index c84dacc..d3ff94a 100644 --- a/src/components/three/ModelViewer.tsx +++ b/src/components/three/ModelViewer.tsx @@ -228,14 +228,15 @@ function useLabelDistanceFactor(position: [number, number, number]): number { return ref.current; } -function MeasurementLabel({ position, text, variant }: { position: [number, number, number]; text: string; variant: 'success' | 'primary' }) { - const df = useLabelDistanceFactor(position); +function MeasurementLabel({ position, text, variant, fixed = false }: { position: [number, number, number]; text: string; variant: 'success' | 'primary'; fixed?: boolean }) { + const dfDynamic = useLabelDistanceFactor(position); + const df = fixed ? dfDynamic : 8; const borderClass = variant === 'success' ? 'border-success/60' : 'border-primary/60'; const textClass = variant === 'success' ? 'text-success' : 'text-primary'; return ( -
- +
+ {text}