(datum: object)
| 13 | |
| 14 | export function getSelectedColorMap(currentData: object[], showSelectedData: boolean, showActive: boolean, viewerOptions: ViewerOptions) { |
| 15 | function getSelectionColorItem(datum: object) { |
| 16 | let item: ColorMappedItem; |
| 17 | if (showSelectedData) { |
| 18 | item = datum[FieldNames.Selected] ? |
| 19 | { color: VegaDeckGl.util.colorFromString(viewerOptions.colors.selectedCube) } |
| 20 | : |
| 21 | { unSelected: true }; |
| 22 | } |
| 23 | if (showActive && datum[FieldNames.Active]) { |
| 24 | item = { color: VegaDeckGl.util.colorFromString(viewerOptions.colors.activeCube) }; |
| 25 | } |
| 26 | return item; |
| 27 | } |
| 28 | const colorMap: ColorMap = {}; |
| 29 | currentData.forEach(datum => { |
| 30 | const selectionColor = getSelectionColorItem(datum); |
no outgoing calls
no test coverage detected