From 737a84a8b803d2bec169593cdf41a6b0bcb8a410 Mon Sep 17 00:00:00 2001 From: blaisadmin Date: Tue, 21 Jul 2026 21:36:51 -0400 Subject: [PATCH] Added graph photos --- frontend/src/App.tsx | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 7662061..ba9127d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6339,6 +6339,49 @@ function App() { {`${bird.name}: ${point.label}`} ))} + {points.length > 0 ? (() => { + const latestPoint = points[points.length - 1]; + const portraitSize = 24; + const portraitGap = 8; + const portraitX = latestPoint.x + portraitGap + portraitSize <= OVERVIEW_WIDTH - 2 + ? latestPoint.x + portraitGap + : latestPoint.x - portraitGap - portraitSize; + const portraitY = Math.min( + Math.max(latestPoint.y - portraitSize / 2, 2), + OVERVIEW_HEIGHT - OVERVIEW_PADDING.bottom - portraitSize - 2, + ); + const clipPathId = `overview-bird-portrait-${bird.id}`; + + return ( + + + + + + + + {`${bird.name}'s latest weight: ${latestPoint.label}`} + + + ); + })() : null} ))}