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 color object 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 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
Getters
| Member | Description |
|---|---|
writtenColorColorSlots | The color object as these writes and an Apply button read it, writtenColorOf. |
Actions
| Member | Description |
|---|---|
colorByField(field: string) => void | Paint by field, keeping its domain, range and key names while it is the field already painting; '' paints value and keeps the field under scale: 'none' for the way back. |
setColorValue(value: string | undefined) => void | Paint every feature value, a CSS color or a jexl: callback, keeping a field under scale: 'none' for the way back; undefined lets each feature's own color paint. |