mirror of
https://github.com/nasa/openmct.git
synced 2025-05-30 06:04:20 +00:00
remove storing navigated to local storage
This commit is contained in:
parent
223a0feada
commit
8f0e773ac1
@ -113,7 +113,6 @@ export default {
|
|||||||
this.openmct.router.on('change:path', this.highlightIfNavigated);
|
this.openmct.router.on('change:path', this.highlightIfNavigated);
|
||||||
|
|
||||||
this.getLocalStorageExpanded();
|
this.getLocalStorageExpanded();
|
||||||
this.getLocalStorageNavigated();
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
/****
|
/****
|
||||||
@ -159,15 +158,6 @@ export default {
|
|||||||
} else if (oldPath === this.navigateToPath) {
|
} else if (oldPath === this.navigateToPath) {
|
||||||
this.navigated = false;
|
this.navigated = false;
|
||||||
}
|
}
|
||||||
this.setLocalStorageNavigated(newPath);
|
|
||||||
},
|
|
||||||
getLocalStorageNavigated() {
|
|
||||||
const navigated = localStorage.getItem(LOCAL_STORAGE_KEY__TREE_NAVIGATED);
|
|
||||||
this.navigated = navigated && JSON.parse(navigated) === this.navigateToPath;
|
|
||||||
},
|
|
||||||
// on path change, store the path string of the new navigated/highlighted path to localstorage
|
|
||||||
setLocalStorageNavigated(path) {
|
|
||||||
localStorage.setItem(LOCAL_STORAGE_KEY__TREE_NAVIGATED, JSON.stringify(path));
|
|
||||||
},
|
},
|
||||||
getLocalStorageExpanded() {
|
getLocalStorageExpanded() {
|
||||||
let expandedPaths = localStorage.getItem(LOCAL_STORAGE_KEY__TREE_EXPANDED);
|
let expandedPaths = localStorage.getItem(LOCAL_STORAGE_KEY__TREE_EXPANDED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user