mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 02:06:49 +00:00
[Navigation Tree] Move "nav up" arrow down one item (#3581)
* moved nav up arrow down one tree item and updated icon * cleaned up css to be more targeted for up arrow Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov> Co-authored-by: charlesh88 <charlesh88@gmail.com>
This commit is contained in:
parent
7623a0648f
commit
6226763c37
@ -57,6 +57,14 @@
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.icon-arrow-nav-to-parent {
|
||||
visibility: hidden;
|
||||
|
||||
&.is-enabled {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
position: relative;
|
||||
&[class*="__item-h"] {
|
||||
@ -99,6 +107,14 @@
|
||||
&.is-context-clicked {
|
||||
box-shadow: inset $colorItemTreeSelectedBg 0 0 0 1px;
|
||||
}
|
||||
|
||||
.icon-arrow-nav-to-parent {
|
||||
visibility: hidden;
|
||||
|
||||
&.is-enabled {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
v-for="(ancestor, index) in focusedAncestors"
|
||||
:key="ancestor.id"
|
||||
:node="ancestor"
|
||||
:show-up="index < focusedAncestors.length - 1 && initialLoad"
|
||||
:show-up="index !== 0 && index < focusedAncestors.length && initialLoad"
|
||||
:show-down="false"
|
||||
:left-offset="index * 10 + 'px'"
|
||||
@resetTree="beginNavigationRequest('handleReset', ancestor)"
|
||||
@ -406,13 +406,17 @@ export default {
|
||||
|
||||
this.childrenSlideClass = 'up';
|
||||
|
||||
let index = this.tempAncestors.indexOf(node);
|
||||
|
||||
this.tempAncestors = [...this.ancestors];
|
||||
this.tempAncestors.splice(this.tempAncestors.indexOf(node) + 1);
|
||||
this.tempAncestors.splice(index);
|
||||
|
||||
let parentNode = this.tempAncestors[index - 1];
|
||||
|
||||
let objectPath = this.ancestorsAsObjects();
|
||||
objectPath.splice(objectPath.indexOf(node.object) + 1);
|
||||
objectPath.splice(objectPath.indexOf(node.object));
|
||||
|
||||
let childrenItems = await this.getChildrenAsTreeItems(node, objectPath, requestId);
|
||||
let childrenItems = await this.getChildrenAsTreeItems(parentNode, objectPath, requestId);
|
||||
|
||||
// if all is good, return true for successful navigation
|
||||
return this.updateTree(this.tempAncestors, childrenItems, requestId);
|
||||
|
@ -20,7 +20,7 @@
|
||||
ref="navUp"
|
||||
v-model="expanded"
|
||||
class="c-tree__item__view-control"
|
||||
:control-class="'c-nav__up'"
|
||||
:control-class="'icon-arrow-nav-to-parent'"
|
||||
:enabled="showUp"
|
||||
@input="resetTreeHere"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user