瀏覽代碼

fix: 修改边左右结构设置

liaojiaxing 5 月之前
父節點
當前提交
f26e790645
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      apps/designer/src/pages/mindmap/edge.ts
  2. 1 1
      apps/designer/src/pages/mindmap/hierarchy.ts

+ 1 - 1
apps/designer/src/pages/mindmap/edge.ts

@@ -529,7 +529,7 @@ const getSourceAnchor = (
           };
     }
     case StructureType.leftRight: {
-      return options?.direction === 'left' ? 'left' : 'right'
+      return type === TopicType.branch ? 'center' : options?.direction === 'left' ? 'left' : 'right'
     }
     case StructureType.tree: {
       return type === TopicType.branch

+ 1 - 1
apps/designer/src/pages/mindmap/hierarchy.ts

@@ -61,7 +61,7 @@ export const hierarchyMethodMap: Record<
       },
       getHGap(d: TopicItem) {
         if (d.type === TopicType.main) return pageSetting.branchX || 20;
-        if (d.type === TopicType.branch) return pageSetting.subTopicX || 20;
+        if (d.type === TopicType.branch) return pageSetting.branchX || 20;
         if (d.type === TopicType.sub) return pageSetting.subTopicX || 20;
         return pageSetting.branchX || 40;
       },