Skip to content

Commit 9b704d3

Browse files
committed
🐛 修复导出选中内容时,框内部的连线丢失的问题
1 parent 70d93c9 commit 9b704d3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/src/core/service/dataGenerateService/stageExportEngine/StageExportSvg.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ export namespace StageExportSvg {
175175
selectedEntities.push(entity);
176176
}
177177
}
178+
// 所有实际包含的uuid集合
179+
const selectedEntitiesUUIDSet = new Set<string>();
180+
for (const entity of selectedEntities) {
181+
selectedEntitiesUUIDSet.add(entity.uuid);
182+
}
183+
178184
return (
179185
<svg
180186
xmlns="http://www.w3.org/2000/svg"
@@ -207,7 +213,9 @@ export namespace StageExportSvg {
207213

208214
{/* 构建连线 */}
209215
{StageManager.getLineEdges()
210-
.filter((edge) => edge.target.isSelected && edge.source.isSelected)
216+
.filter(
217+
(edge) => selectedEntitiesUUIDSet.has(edge.source.uuid) && selectedEntitiesUUIDSet.has(edge.target.uuid),
218+
)
211219
.map((edge) => dumpEdge(edge))}
212220
</svg>
213221
);

0 commit comments

Comments
 (0)