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. |
1 inherited getter from one model
From ParkedColorMixin: parkedColor
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. |
pickDefaultColor() => void | Color by's Default: no field and no constant, 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