diff --git a/src/App.jsx b/src/App.jsx index 0feebd6..f423f6f 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -133,6 +133,62 @@ const filterDatasetForPlotType = (dataset, plotType) => { return dataset; }; +const PreviewPanel = ({ lensCurves }) => { + const previewItems = lensCurves.map((curve) => { + const infinityStat = curve.checkpointStats.find((stat) => !Number.isFinite(stat.separation)); + const blurPercent = infinityStat?.blurPercentOfDiagonal ?? 0; + + return { + lens: curve.lens, + blurPercent, + colorIndex: curve.colorIndex, + }; + }); + + const maxBlurPercent = previewItems.reduce((maxValue, item) => Math.max(maxValue, item.blurPercent), 0); + const denominator = maxBlurPercent > 0 ? maxBlurPercent : 1; + + return ( +