mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
[TimeAPI] Fix independent time context check (#6308)
* Fix independent time context to check first object in path (self) for upstream content instead of last object in path * Revert changes that don't allow unregistering independent time context --------- Co-authored-by: Shefali <simplyrender@gmail.com>
This commit is contained in:
@ -202,16 +202,10 @@ class IndependentTimeContext extends TimeContext {
|
||||
}
|
||||
|
||||
getUpstreamContext() {
|
||||
const objectKey = this.openmct.objects.makeKeyString(this.objectPath[this.objectPath.length - 1].identifier);
|
||||
const doesObjectHaveTimeContext = this.globalTimeContext.independentContexts.get(objectKey);
|
||||
if (doesObjectHaveTimeContext) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let timeContext = this.globalTimeContext;
|
||||
this.objectPath.some((item, index) => {
|
||||
const key = this.openmct.objects.makeKeyString(item.identifier);
|
||||
//last index is the view object itself
|
||||
//first index is the view object itself
|
||||
const itemContext = this.globalTimeContext.independentContexts.get(key);
|
||||
if (index > 0 && itemContext && itemContext.hasOwnContext()) {
|
||||
//upstream time context
|
||||
|
Reference in New Issue
Block a user