mirror of
https://github.com/nasa/openmct.git
synced 2025-03-21 03:25:44 +00:00
Changes for tabs visibility and priority
- Make Elements pool visible in browse mode, omit edit capabilities.
This commit is contained in:
parent
ffa6ea6276
commit
9f1cac57ed
@ -22,6 +22,7 @@
|
||||
|
||||
<template>
|
||||
<li
|
||||
v-if="allowDrag"
|
||||
draggable="true"
|
||||
:aria-label="`${elementObject.name} Element Item`"
|
||||
:aria-grabbed="hover"
|
||||
@ -47,6 +48,22 @@
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li v-else :aria-label="`${elementObject.name} Element Item`">
|
||||
<div
|
||||
class="c-tree__item c-elements-pool__item js-elements-pool__item"
|
||||
:class="{
|
||||
'is-context-clicked': contextClickActive,
|
||||
hover: hover,
|
||||
'is-alias': isAlias
|
||||
}"
|
||||
>
|
||||
<ObjectLabel
|
||||
:domain-object="elementObject"
|
||||
:object-path="[elementObject, domainObject]"
|
||||
@context-click-active="setContextClickState"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -74,6 +91,9 @@ export default {
|
||||
},
|
||||
allowDrop: {
|
||||
type: Boolean
|
||||
},
|
||||
allowDrag: {
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
emits: ['drop-custom', 'dragstart-custom'],
|
||||
|
@ -39,6 +39,7 @@
|
||||
:key="element.identifier.key"
|
||||
:index="index"
|
||||
:element-object="element"
|
||||
:allow-drag="isEditing"
|
||||
:allow-drop="allowDrop"
|
||||
@dragstart-custom="moveFrom(index)"
|
||||
@drop-custom="moveTo(index)"
|
||||
@ -92,6 +93,7 @@ export default {
|
||||
methods: {
|
||||
setEditState(isEditing) {
|
||||
this.isEditing = isEditing;
|
||||
console.log('this.isEditing', this.isEditing);
|
||||
this.showSelection(this.openmct.selection.get());
|
||||
},
|
||||
showSelection(selection) {
|
||||
|
@ -62,7 +62,7 @@ export default function ElementsViewProvider(openmct) {
|
||||
showTab: function (isEditing) {
|
||||
const hasComposition = Boolean(domainObject && openmct.composition.get(domainObject));
|
||||
|
||||
return hasComposition && isEditing;
|
||||
return hasComposition;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.priority.DEFAULT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user