mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +00:00
* Don't allow recursive Preview actions #2775 * actionsToBeIncluded and actionsToBeSkipped passed in as options object. * Revert "actionsToBeIncluded and actionsToBeSkipped passed in as options object." This reverts commitf501d0b4ba
. * Revert "Don't allow recursive Preview actions #2775" This reverts commit5563cbea3a
. * Don't allow recursive Preview actions Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
parent
3282934cf6
commit
23303c910e
@ -36,7 +36,12 @@ export default class PreviewAction {
|
||||
* Dependencies
|
||||
*/
|
||||
this._openmct = openmct;
|
||||
|
||||
if (PreviewAction.isVisible === undefined) {
|
||||
PreviewAction.isVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
invoke(objectPath) {
|
||||
let preview = new Vue({
|
||||
components: {
|
||||
@ -59,12 +64,19 @@ export default class PreviewAction {
|
||||
callback: () => overlay.dismiss()
|
||||
}
|
||||
],
|
||||
onDestroy: () => preview.$destroy()
|
||||
onDestroy: () => {
|
||||
PreviewAction.isVisible = false;
|
||||
preview.$destroy()
|
||||
}
|
||||
});
|
||||
|
||||
PreviewAction.isVisible = true;
|
||||
}
|
||||
|
||||
appliesTo(objectPath) {
|
||||
return !this._isNavigatedObject(objectPath) && !this._preventPreview(objectPath);
|
||||
return !PreviewAction.isVisible && !this._isNavigatedObject(objectPath);
|
||||
}
|
||||
|
||||
_isNavigatedObject(objectPath) {
|
||||
let targetObject = objectPath[0];
|
||||
let navigatedObject = this._openmct.router.path[0];
|
||||
|
Loading…
Reference in New Issue
Block a user