ColorWritesMixin
Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the developer guide for concepts. Built into JBrowse core. View source.
The writes a display's encoding.color channel takes from a menu row or a picker: the field it paints by (colorByField) and the constant every feature paints (setColorValue). Each rewrites the object as written, so what a pick leaves alone stays as it was, and a pick of what already paints writes nothing, since every color tier keys on the object's arrays. A pick away from a field parks it (ParkedColorMixin), so picking it again keeps its domain, range and key names. A dialog's Apply button writes the whole object through applyPlot, which rebuilds the display's config for the draft, too dear for a picker writing once per drag frame
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
1 inherited property from one model
From ParkedColorMixin: parkedColors
Getters
| Member | Description |
|---|---|
writtenColorColorSlots |
The encoding.color channel as these writes and an Apply button read it, writtenColorOf. |
2 inherited getters from one model
Methods
1 inherited method from one model
Actions
| Member | Description |
|---|---|
colorByField(field: string | undefined) => void |
Paint by field, keeping its domain, range and key names while it is the field already painting or the one parked; undefined paints value and parks the field. |
setColorValue(value: string | undefined) => void |
Paint every feature value, a CSS color or a jexl: callback, parking the field; undefined lets each feature's own color paint. |
colorByIdentity() => void |
Paint each feature its file's own color through a fieldless identity scale, parking the field and taking back a parked key. |
| colorByScheme |
Paint along scheme, with reverse back to unset so it follows the scheme and a written scale.range, which would win over it, cleared; fieldScheme, the painted field's own scheme, is written unset so the channel keeps following the field. |
pickDefaultColor() => void |
Color by's Default: no field, no constant and no identity scale, so the track's own color paints, a jexl: expression included. |
pickSolidColor() => void |
Color by's Solid color...: paints the constant kept beside a painting field, where there is one, and opens the display's picker. |
1 inherited action from one model
From ParkedColorMixin: parkColor