fix: condition node supports drag and drop
This commit is contained in:
parent
bbb63a5928
commit
675d2366da
@ -248,6 +248,9 @@ function onEnd(event?: any) {
|
|||||||
if (oldIndex === undefined || newIndex === undefined) return
|
if (oldIndex === undefined || newIndex === undefined) return
|
||||||
const list = cloneDeep(props.nodeModel.properties.node_data.branch)
|
const list = cloneDeep(props.nodeModel.properties.node_data.branch)
|
||||||
if (oldIndex === list.length - 1 || newIndex === list.length - 1) {
|
if (oldIndex === list.length - 1 || newIndex === list.length - 1) {
|
||||||
|
list[newIndex] = list[oldIndex]
|
||||||
|
list[oldIndex] = clonedData
|
||||||
|
set(props.nodeModel.properties.node_data, 'branch', list)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
list[newIndex].type = list[oldIndex].type
|
list[newIndex].type = list[oldIndex].type
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user