[Plot] Handle changes to telemetry objects

Handle changes to the set of visible telemetry objects
in a plot; addresses WTD-619, which is related to WTD-1329.
This commit is contained in:
Victor Woeltjen
2015-06-24 12:54:49 -07:00
parent f2df0bfdbb
commit bcfe80fbdc
2 changed files with 20 additions and 18 deletions

View File

@ -147,7 +147,8 @@ define(
telemetryObjects = objects;
metadatas = objects.map(lookupMetadata);
// Fire callback, as this will be the first time that
// telemetry objects are available
// telemetry objects are available, or these objects
// will have changed.
if (callback) {
callback();
}
@ -176,9 +177,10 @@ define(
}
function idsMatch(ids) {
return ids.every(function (id, index) {
return telemetryObjects[index].getId() === id;
});
return ids.length === telemetryObjects.length &&
ids.every(function (id, index) {
return telemetryObjects[index].getId() === id;
});
}
function modelChange(model) {