Show selected node above others
This commit is contained in:
parent
8284baa1a0
commit
502fa99f5d
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,10 @@ const stage = ref<any>(null);
|
||||||
|
|
||||||
const sortedNodes = computed(() => {
|
const sortedNodes = computed(() => {
|
||||||
const nodes = props.nodes.value.slice();
|
const nodes = props.nodes.value.slice();
|
||||||
|
if (props.selectedNode.value) {
|
||||||
|
const node = nodes.splice(nodes.indexOf(props.selectedNode.value), 1)[0];
|
||||||
|
nodes.push(node);
|
||||||
|
}
|
||||||
if (props.draggingNode.value) {
|
if (props.draggingNode.value) {
|
||||||
const node = nodes.splice(nodes.indexOf(props.draggingNode.value), 1)[0];
|
const node = nodes.splice(nodes.indexOf(props.draggingNode.value), 1)[0];
|
||||||
nodes.push(node);
|
nodes.push(node);
|
||||||
|
|
Loading…
Reference in a new issue