sciencemine / digital-signage

4 stars 0 forks source link

Data management refactor #114

Closed HumbleHominid closed 7 years ago

HumbleHominid commented 7 years ago

Addresses issue https://github.com/sciencemine/digital-signage/issues/112

Model Data for the exhibit is loaded into a service in the model hook of the main route. This allows for the components to have access to the model without having to pass around objects. When loaded, the modelData service will generate the map data for the data that is loaded. This is then stored as a _mapData parameter in the service preventing recalculation of the map data on subsuquent calls. All components have been altered to pull data from the modelData service via a key or array of keys that they are given. The one exception is the videoStack component as it has support for both taking an array of keys as well as taking an array of video objects. This is because the modelData service is not loaded until the model hook of the main route so it is necessary to be able to pass arrays of objects to a videoStack component to create the video display on the exhibit selection screen.

HumbleHominid commented 7 years ago

testing from the wrong branch. these are addressed under data-management-refactor