mirror of
https://github.com/nasa/openmct.git
synced 2025-06-05 17:01:41 +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>
|
<template>
|
||||||
<li
|
<li
|
||||||
|
v-if="allowDrag"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
:aria-label="`${elementObject.name} Element Item`"
|
:aria-label="`${elementObject.name} Element Item`"
|
||||||
:aria-grabbed="hover"
|
:aria-grabbed="hover"
|
||||||
@ -47,6 +48,22 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -74,6 +91,9 @@ export default {
|
|||||||
},
|
},
|
||||||
allowDrop: {
|
allowDrop: {
|
||||||
type: Boolean
|
type: Boolean
|
||||||
|
},
|
||||||
|
allowDrag: {
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ['drop-custom', 'dragstart-custom'],
|
emits: ['drop-custom', 'dragstart-custom'],
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
:key="element.identifier.key"
|
:key="element.identifier.key"
|
||||||
:index="index"
|
:index="index"
|
||||||
:element-object="element"
|
:element-object="element"
|
||||||
|
:allow-drag="isEditing"
|
||||||
:allow-drop="allowDrop"
|
:allow-drop="allowDrop"
|
||||||
@dragstart-custom="moveFrom(index)"
|
@dragstart-custom="moveFrom(index)"
|
||||||
@drop-custom="moveTo(index)"
|
@drop-custom="moveTo(index)"
|
||||||
@ -92,6 +93,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
setEditState(isEditing) {
|
setEditState(isEditing) {
|
||||||
this.isEditing = isEditing;
|
this.isEditing = isEditing;
|
||||||
|
console.log('this.isEditing', this.isEditing);
|
||||||
this.showSelection(this.openmct.selection.get());
|
this.showSelection(this.openmct.selection.get());
|
||||||
},
|
},
|
||||||
showSelection(selection) {
|
showSelection(selection) {
|
||||||
|
@ -62,7 +62,7 @@ export default function ElementsViewProvider(openmct) {
|
|||||||
showTab: function (isEditing) {
|
showTab: function (isEditing) {
|
||||||
const hasComposition = Boolean(domainObject && openmct.composition.get(domainObject));
|
const hasComposition = Boolean(domainObject && openmct.composition.get(domainObject));
|
||||||
|
|
||||||
return hasComposition && isEditing;
|
return hasComposition;
|
||||||
},
|
},
|
||||||
priority: function () {
|
priority: function () {
|
||||||
return openmct.priority.DEFAULT;
|
return openmct.priority.DEFAULT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user