From c2c7a310f1af685cf8628c61639894703bd0e845 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 13:04:27 +0000 Subject: [PATCH] Changes Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com> --- src/components/three/ModelViewer.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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}