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.
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, themodelData
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 themodelData
service via a key or array of keys that they are given. The one exception is thevideoStack
component as it has support for both taking an array of keys as well as taking an array of video objects. This is because themodelData
service is not loaded until the model hook of themain
route so it is necessary to be able to pass arrays of objects to avideoStack
component to create the video display on the exhibit selection screen.