(prefs: Prefs, chart: SandDance.specs.Chart, role: string, columnName: string)
| 57 | } |
| 58 | |
| 59 | export function copyPrefToNewState(prefs: Prefs, chart: SandDance.specs.Chart, role: string, columnName: string) { |
| 60 | const specTypePrefs = SandDance.VegaDeckGl.util.deepMerge({}, prefs['*'], prefs[chart]); |
| 61 | const rolePrefs = SandDance.VegaDeckGl.util.deepMerge({}, specTypePrefs['*'], specTypePrefs[role]); |
| 62 | const partialInsight = SandDance.VegaDeckGl.util.deepMerge({}, rolePrefs['*'], rolePrefs[columnName]); |
| 63 | return partialInsight; |
| 64 | } |
| 65 | |
| 66 | export function savePref(prefs: Prefs, chart: SandDance.specs.Chart, role: string, column: string, partialInsight: Partial<SandDance.specs.Insight>) { |
| 67 | const SpecTypePrefs = prefs[chart] || {}; |
no outgoing calls
no test coverage detected