Browse Source

fix: 修改边左右结构设置

liaojiaxing 5 months ago
parent
commit
f26e790645

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

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

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

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