From 1d2f4a0cb217c93de80c0fdf3c40bd6f4081f60c Mon Sep 17 00:00:00 2001 From: chenxing Date: Sat, 3 Oct 2026 15:13:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor(diagram):=20=E5=81=9C=E9=80=8F?= =?UTF-8?q?=E4=BC=A0=E5=BA=9F=E5=BC=83=E7=9A=84=20layout=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=88positions=20=E5=8D=95=E6=BA=90=E7=94=9F?= =?UTF-8?q?=E6=95=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunhai/flowcenter/model/FlowModels.java | 4 +--- .../flowcenter/service/FlowDiagramService.java | 14 -------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/main/java/com/yunhai/flowcenter/model/FlowModels.java b/src/main/java/com/yunhai/flowcenter/model/FlowModels.java index bdfc996..c4e0203 100644 --- a/src/main/java/com/yunhai/flowcenter/model/FlowModels.java +++ b/src/main/java/com/yunhai/flowcenter/model/FlowModels.java @@ -121,11 +121,9 @@ public final class FlowModels { private String mode; private List nodes; private List edges; - /** 画布坐标(nodeId→{x,y},设计器保存时透传;空=查看器自行自动布局) */ - private Map> layout; /** * 布局单源(2026-10-03 三视图统一):nodeId → {x,y,w,h}(内容区坐标,min 归零)。 - * 查看端(前端 SVG / PNG)一律以此为准;layout(设计器画布坐标)已废弃,兼容期仍下发。 + * 查看端(前端 SVG / PNG)一律以此为准;layout(设计器画布坐标)已随画布退役删除。 */ private Map> positions; } diff --git a/src/main/java/com/yunhai/flowcenter/service/FlowDiagramService.java b/src/main/java/com/yunhai/flowcenter/service/FlowDiagramService.java index 63a9c8e..f010752 100644 --- a/src/main/java/com/yunhai/flowcenter/service/FlowDiagramService.java +++ b/src/main/java/com/yunhai/flowcenter/service/FlowDiagramService.java @@ -153,20 +153,6 @@ public class FlowDiagramService { positions.put(id, p); }); vo.setPositions(positions); - // 画布坐标透传(设计器保存;缺失时前端自行 Kahn 布局) - if (model.layout != null && !model.layout.isEmpty()) { - Map> layout = new HashMap<>(); - for (Map.Entry en : model.layout.entrySet()) { - if (en.getValue() == null) { - continue; - } - Map p = new HashMap<>(); - p.put("x", en.getValue().x); - p.put("y", en.getValue().y); - layout.put(en.getKey(), p); - } - vo.setLayout(layout); - } // instance 口径:按任务轨迹给节点上运行时状态(前端高亮在办节点) if (instanceId != null) { Map states = nodeStates(instanceId, model);