fix: >1 factor

This commit is contained in:
TrèsAbhi committed 2025-08-07 11:39:28 -05:00
1 parent 3c51f4f94a
commit 19a2492555
3 files changed
+10 -2

No files matched your search

@@ -21,6 +21,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
fakeDistance: fakeLog(range.distance / maxDistance, 2),
}));
const maxFakeDistance = ranges.at(-1)!.fakeDistance;
const maxFactor = ranges[0].factor;
const { strings } = useLocale();
@@ -81,7 +82,7 @@ export function AssaultRangesVisualizer({ ranges: _ranges, stats }: Props) {
return (
<Box
width={`${fraction * 100}%`}
height={`${range.factor * 100}%`}
height={`${(range.factor / maxFactor) * 100}%`}
style={{
background: `linear-gradient(45deg, ${color1}, ${color0})`,
}}