[Telemetry] Fire callback when objects are available

Fire callback from telemetry subscriber when the set of
object references changes. This allows views which use
the subscriber to register one callback, while still
ensuring that they are notified when there is new
information to show. Supports fixed position view, WTD-879.
This commit is contained in:
Victor Woeltjen 2015-02-18 20:37:23 -08:00
parent 7bd41a9f80
commit 035b2e36c3

View File

@ -138,6 +138,11 @@ define(
function cacheObjectReferences(objects) {
telemetryObjects = objects;
metadatas = objects.map(lookupMetadata);
// Fire callback, as this will be the first time that
// telemetry objects are available
if (callback) {
callback();
}
return objects;
}