refactor(diagram): 停透传废弃的 layout 字段(positions 单源生效)
This commit is contained in:
@@ -121,11 +121,9 @@ public final class FlowModels {
|
||||
private String mode;
|
||||
private List<NodeVo> nodes;
|
||||
private List<EdgeVo> edges;
|
||||
/** 画布坐标(nodeId→{x,y},设计器保存时透传;空=查看器自行自动布局) */
|
||||
private Map<String, Map<String, Integer>> layout;
|
||||
/**
|
||||
* 布局单源(2026-10-03 三视图统一):nodeId → {x,y,w,h}(内容区坐标,min 归零)。
|
||||
* 查看端(前端 SVG / PNG)一律以此为准;layout(设计器画布坐标)已废弃,兼容期仍下发。
|
||||
* 查看端(前端 SVG / PNG)一律以此为准;layout(设计器画布坐标)已随画布退役删除。
|
||||
*/
|
||||
private Map<String, Map<String, Integer>> positions;
|
||||
}
|
||||
|
||||
@@ -153,20 +153,6 @@ public class FlowDiagramService {
|
||||
positions.put(id, p);
|
||||
});
|
||||
vo.setPositions(positions);
|
||||
// 画布坐标透传(设计器保存;缺失时前端自行 Kahn 布局)
|
||||
if (model.layout != null && !model.layout.isEmpty()) {
|
||||
Map<String, Map<String, Integer>> layout = new HashMap<>();
|
||||
for (Map.Entry<String, FlowDefModel.Layout> en : model.layout.entrySet()) {
|
||||
if (en.getValue() == null) {
|
||||
continue;
|
||||
}
|
||||
Map<String, Integer> 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<String, String> states = nodeStates(instanceId, model);
|
||||
|
||||
Reference in New Issue
Block a user