Pārlūkot izejas kodu

fix(container): workflow nested container parent cannot drop to children (#965)

Louis Young 2 mēneši atpakaļ
vecāks
revīzija
f3f8275e99

+ 6 - 1
packages/plugins/free-container-plugin/src/node-into-container/service.ts

@@ -298,7 +298,12 @@ export class NodeIntoContainerService {
   }): boolean {
     const { dragNode, dropNode } = params;
     const isDropContainer = dropNode?.getNodeMeta<WorkflowNodeMeta>().isContainer;
-    if (!dropNode || !isDropContainer || this.isParent(dragNode, dropNode)) {
+    if (
+      !dropNode ||
+      !isDropContainer ||
+      this.isParent(dragNode, dropNode) ||
+      this.isParent(dropNode, dragNode)
+    ) {
       return false;
     }
     if (