From 6475f92c720084043d10c9b1d3fe5243980f722b Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Tue, 18 Jun 2024 23:19:58 -0400 Subject: [PATCH] add round points to match graph --- src/routes/(app)/match/+page.svelte | 33 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/routes/(app)/match/+page.svelte b/src/routes/(app)/match/+page.svelte index b855511..7204482 100644 --- a/src/routes/(app)/match/+page.svelte +++ b/src/routes/(app)/match/+page.svelte @@ -515,9 +515,14 @@ } .player-pt { - stroke-width: 0.6em; + stroke-width: 0.33em; stroke-linecap: round; stroke-linejoin: round; + box-sizing: border-box; + + &.final { + stroke-width: 0.66em; + } } } @@ -584,9 +589,9 @@
r.balances.map(bs => bs.slice(1))).flat(2), @@ -602,13 +607,23 @@ })) } let:d> - - - + {#each data.rounds as round, roundIdx} + {@const balances = round.balances[player.idx]} + {@const scoreAsset = balances + .slice(1) + .reduce((a, v, i) => v >= balances[a+1] ? i : a, 0) + 1 + } + + + + {/each}
{/each}