ramp4-pcar4 / config-editor

A config editor for RAMP4.
1 stars 1 forks source link

Autolegend and Pinia #42

Closed mohsin-r closed 1 month ago

mohsin-r commented 1 month ago

Closes #34. Closes #35.

james-rae commented 1 month ago

Fun refactor idea (assuming it works. works in my head).

In store.ts, have and export functions like this

function fixtures(): AppropriateType {
  return configs[editingLang].fixtures;
}

Do the same for layers, map, anything else that makes sense. Then all the repeated store.configs[store.editingLang].fixtures.legend code becomes store.fixtures().legend