|
@@ -74,7 +74,7 @@ const renderPokemonTileCluster = (area, totalSize, { mu, nu }, scores) => {
|
|
|
|
|
|
const clusterToggles = {};
|
|
|
|
|
|
-const renderPokemonTile = (kind, name, { total: { mu, nu, size }, clusters }, scores) => {
|
|
|
+const renderPokemonTile = (kind, name, { total: { mu, nu, size }, clusters }, scores, bestClusterIndex) => {
|
|
|
const clusterToggleId = `${name}-${kind}-pkmn-expand-toggle`;
|
|
|
const textColor = getContrastingTextColor(mu.hex);
|
|
|
|
|
@@ -137,6 +137,12 @@ const renderPokemonTile = (kind, name, { total: { mu, nu, size }, clusters }, sc
|
|
|
["N =", size],
|
|
|
].map(([lbl, val, cls]) => renderStatPair(lbl, val, cls))
|
|
|
)}
|
|
|
+ ${ bestClusterIndex < 0 ? "" : `<hr style="width: 80%; color: ${textColor}"/>` }
|
|
|
+ ${ renderStatRow([
|
|
|
+ `<span class="pkmn-tile_indicator">${bestClusterIndex === 0 ? "▼" : ""}</span>`,
|
|
|
+ `<span class="pkmn-tile_indicator">${bestClusterIndex === 1 ? "▼" : ""}</span>`,
|
|
|
+ `<span class="pkmn-tile_indicator">${bestClusterIndex === 2 ? "▼" : ""}</span>`,
|
|
|
+ ])}
|
|
|
</div>
|
|
|
</div>
|
|
|
${clusters.map((c, i) => renderPokemonTileCluster(`cls${i+1}`, size, c, scores.clusters[i])).join("\n")}
|