SpringSaLaD: the reserved Anchor site defaults to DARK_GRAY, which is nearly invisible in the trajectory viewer

Aperta Adatta ai principianti
#2,072 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
desktop, frontend

Direzione di ricerca

Inizia con l'helper visible(Color c) in SpringSaladViewerCanvas (vicino alla riga 111, dove lo sfondo viene impostato su Color.black) e il suo controllo floor = 40, poi trova la riga di SpeciesContextSpec che imposta nextColor = Colors.DARKGRAY per componentCount == anchorIndex. Decidi, in base alle opzioni dell'issue, se cambiare il colore predefinito dell'Anchor, alzare la lifting floor, o entrambe le cose. L'issue è risolto quando il Anchor site è chiaramente visibile come sfera nel visualizzatore 3D Trajectory sullo sfondo nero, con tutti i test della tabella dei colori o i controlli di rendering del visualizzatore esistenti che passano ancora.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The 3D Trajectory viewer draws on a black background
(SpringSaladViewerCanvas:111, setBackground(Color.black)), so a dark site colour is a
site the user cannot see. The default colour VCell gives the reserved Anchor site is
DARK_GRAY.

SpeciesContextSpec assigns it explicitly — if (componentCount == anchorIndex) nextColor = Colors.DARKGRAY; — presumably to mark the anchor as structural rather than chemical,
which reads well in the Molecular Structures tables and in the molecule diagram. In the
viewer it is a smudge: DARK_GRAY is (64,64,64), and the sphere shading multiplies that down
further.

The canvas already has a guard for this, but it does not reach far enough:

/**
 * Lift a color that is too dark to survive the sphere shading (which multiplies by luminance) —
 * BLACK would otherwise be an invisible disc on the black background.
 */
private static Color visible(Color c) {
    int floor = 40;
    ...
}

DARK_GRAY sails past that floor untouched, and BLACK, which the floor does catch, is only
lifted to (40,40,40) — still very close to invisible.

Why it matters

A membrane molecule must have an Anchor site, so this is not an unusual configuration:
it is every membrane molecule in every SpringSaLaD model, unless the modeller happened to
change the colour. Someone looking at a trajectory to see whether their receptors are
clustering is looking at the one site that holds the molecule in the membrane.

Options

  • Change the default for the Anchor site to something light — WHITE or LIGHT_GRAY. It
    would still read as "structural, not chemical" against the coloured domains, and it would
    be visible in both places.
  • Raise the floor in visible() so that anything dark enough to disappear against black
    is lifted, rather than only near-black. This helps every dark colour a user picks, not
    just the default.
  • Both. They solve different halves: one is about the default, the other about a colour the
    user chose without knowing the background.

Documented in the meantime, on the new SpringSaLaD Species and Results help pages.

Lingua principale
Java
Stelle
140
Fork
35
Merge medio
22h 6m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di virtualcell/vcell

Tutte le issue di virtualcell/vcell

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.