Hide vue plots from showing up in the view-switcher and in the preview window (#3725)

* Hide vue plots from showing up in the view-switcher and in the preview window.
This commit is contained in:
Shefali Joshi
2021-03-03 11:33:31 -08:00
committed by GitHub
parent b68f79f427
commit b8ded0a16e
21 changed files with 101 additions and 47 deletions

View File

@ -71,10 +71,10 @@ define(
openmct.editor.cancel();
}
function isFirstViewEditable(domainObject) {
let firstView = openmct.objectViews.get(domainObject)[0];
function isFirstViewEditable(domainObject, objectPath) {
let firstView = openmct.objectViews.get(domainObject, objectPath)[0];
return firstView && firstView.canEdit && firstView.canEdit(domainObject);
return firstView && firstView.canEdit && firstView.canEdit(domainObject, objectPath);
}
function navigateAndEdit(object) {
@ -88,7 +88,7 @@ define(
window.location.href = url;
if (isFirstViewEditable(object.useCapability('adapter'))) {
if (isFirstViewEditable(object.useCapability('adapter'), objectPath)) {
openmct.editor.edit();
}
}