mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 18:57:01 +00:00
Tracking navigation requests, if multiple, only finish on latest (#3403)
This commit is contained in:
parent
db33f0538a
commit
5f7e34ce6c
@ -193,10 +193,6 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
syncTreeNavigation() {
|
||||
if (this.isLoading) {
|
||||
return;
|
||||
}
|
||||
|
||||
const AND_SAVE_PATH = true;
|
||||
let currentLocationPath = this.openmct.router.currentLocation.path;
|
||||
let hasParent = this.currentlyViewedObjectParentPath() || (this.multipleRootChildren && !this.currentlyViewedObjectParentPath());
|
||||
@ -441,6 +437,9 @@ export default {
|
||||
}
|
||||
},
|
||||
async getAllChildren(node) {
|
||||
let currentNavigationRequest = this.openmct.objects.makeKeyString(node.object.identifier);
|
||||
this.latestNavigationRequest = currentNavigationRequest;
|
||||
|
||||
await this.clearVisibleItems();
|
||||
this.isLoading = true;
|
||||
|
||||
@ -455,7 +454,10 @@ export default {
|
||||
this.composition.on('add', this.addChild);
|
||||
this.composition.on('remove', this.removeChild);
|
||||
await this.composition.load();
|
||||
this.finishLoading();
|
||||
|
||||
if (currentNavigationRequest === this.latestNavigationRequest) {
|
||||
this.finishLoading();
|
||||
}
|
||||
},
|
||||
buildTreeItem(domainObject) {
|
||||
let navToParent = ROOT_PATH + this.currentNavigatedPath;
|
||||
@ -636,20 +638,12 @@ export default {
|
||||
this.setContainerHeight();
|
||||
},
|
||||
handleReset(node) {
|
||||
if (this.isLoading) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.childrenSlideClass = 'up';
|
||||
this.ancestors.splice(this.ancestors.indexOf(node) + 1);
|
||||
this.getAllChildren(node);
|
||||
this.setCurrentNavigatedPath();
|
||||
},
|
||||
handleExpanded(node) {
|
||||
if (this.activeSearch || this.isLoading) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.childrenSlideClass = 'down';
|
||||
let newParent = this.buildTreeItem(node);
|
||||
this.ancestors.push(newParent);
|
||||
|
Loading…
Reference in New Issue
Block a user