Show selected node above others

This commit is contained in:
thepaperpilot 2023-05-12 09:39:58 -05:00
parent 38ae7f210c
commit 29277559ff

View file

@ -99,6 +99,10 @@ const stage = ref<any>(null);
const sortedNodes = computed(() => {
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) {
const node = nodes.splice(nodes.indexOf(props.draggingNode.value), 1)[0];
nodes.push(node);