mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-24 04:02:19 +00:00
Satellite class pills use readable body-size text
The class pills' text was the chips' 8px dim mono. It is now the row's body text: the layer name's 13px size and full-contrast colour, on or off. The accent border and fill still mark a class that is on, and the swatch grows to match. Measured in the panel, the pill text is 12.7:1 to 15.3:1 against its background, from about 2.9:1 before. Each class chip is marked `keyed`, so it keeps that text while off, when it carries no swatch or count.
This commit is contained in:
1 parent
d1ea26ab92
commit
b4ffc49ef8
6 files changed
+45
-16
No files matched your search
Vendored
+5
-3
@@ -712,7 +712,7 @@ export function createControls({ state: layerState, services, parts, source }) {
|
||||
|
||||
/**
|
||||
* Layer-row sub-controls (DataLayerManager row-controls contract): one
|
||||
* toggle chip per satellite class (src/layers/satellites/classes.js). A
|
||||
* keyed toggle chip per satellite class (src/layers/satellites/classes.js). A
|
||||
* class that is on carries its point colour (`swatch`) and, once any of
|
||||
* it is loaded, its count, so the point colours are learnable; a class
|
||||
* that is off carries only its name.
|
||||
@@ -752,8 +752,10 @@ export function createControls({ state: layerState, services, parts, source }) {
|
||||
title: t(SATELLITE_CLASS_DISPLAY[id].blurb),
|
||||
params: { classes: { [id]: classes[id] !== true } },
|
||||
};
|
||||
// The colour key and count ride on a class that is on; an off
|
||||
// class is its name alone.
|
||||
// Every class chip is a keyed chip, so its name reads the same on
|
||||
// or off. The colour key and count ride on a class that is on; an
|
||||
// off class is its name alone.
|
||||
chip.keyed = true;
|
||||
if (!chip.active) return chip;
|
||||
chip.swatch = SATELLITE_CLASS_DISPLAY[id].color;
|
||||
if (counts[id] > 0) chip.count = counts[id];
|
||||
|
||||
Reference in new issue
Block a user