mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[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:
parent
7bd41a9f80
commit
035b2e36c3
@ -138,6 +138,11 @@ define(
|
|||||||
function cacheObjectReferences(objects) {
|
function cacheObjectReferences(objects) {
|
||||||
telemetryObjects = objects;
|
telemetryObjects = objects;
|
||||||
metadatas = objects.map(lookupMetadata);
|
metadatas = objects.map(lookupMetadata);
|
||||||
|
// Fire callback, as this will be the first time that
|
||||||
|
// telemetry objects are available
|
||||||
|
if (callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
return objects;
|
return objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user