Browse Source

fix(demo): click move out button should clear invalid lines (#696)

Louis Young 5 tháng trước cách đây
mục cha
commit
ac33fad7e8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      apps/demo-free-layout/src/components/node-menu/index.tsx

+ 1 - 1
apps/demo-free-layout/src/components/node-menu/index.tsx

@@ -50,13 +50,13 @@ export const NodeMenu: FC<NodeMenuProps> = ({ node, deleteNode, updateTitleEdit
       const sourceParent = node.parent;
       // move out of container - 移出容器
       nodeIntoContainerService.moveOutContainer({ node });
+      await delay(16);
       // clear invalid lines - 清除非法线条
       await nodeIntoContainerService.clearInvalidLines({
         dragNode: node,
         sourceParent,
       });
       rerenderMenu();
-      await delay(16);
       // select node - 选中节点
       selectService.selectNode(node);
       // start drag node - 开始拖拽