fix: 避免关系图间隙太小
This commit is contained in:
parent
7c4a6ecd96
commit
ea01543ab9
|
@ -15,6 +15,11 @@ public class RelationshipGraphData {
|
|||
private List<Node> data;
|
||||
private List<Edge> links;
|
||||
|
||||
// x 轴占用了多少单位
|
||||
private int xUnitCount;
|
||||
// y 轴占用了多少单位
|
||||
private int yUnitCount;
|
||||
|
||||
public RelationshipGraphData() {
|
||||
this.data = new ArrayList<>();
|
||||
this.links = new ArrayList<>();
|
||||
|
|
|
@ -63,7 +63,7 @@ public class RelationshipEdgeService {
|
|||
|
||||
// 去掉要删除的边
|
||||
edges = edges.stream()
|
||||
.filter(i -> i.getSourceId() != sourceId || i.getTargetId() != targetId)
|
||||
.filter(i -> !i.getSourceId().equals(sourceId) && !i.getTargetId().equals(targetId))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Set<String> nodes = new HashSet<>();
|
||||
|
@ -114,7 +114,7 @@ public class RelationshipEdgeService {
|
|||
}
|
||||
|
||||
nextLevelNodes.forEach(nextNode -> {
|
||||
if (!markSet.contains(node)) {
|
||||
if (!markSet.contains(nextNode)) {
|
||||
dfsForMark(nextNode, edges, markSet, true);
|
||||
dfsForMark(nextNode, edges, markSet, false);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1f86f9d47a27e67b4c1e21d94c2ccfacfccc7288
|
||||
Subproject commit 040516036651363ae9775ccfb57714ac81e7230e
|
|
@ -1 +1 @@
|
|||
Subproject commit b50fa6030ea19d01985aabed1e7d9d804737ad59
|
||||
Subproject commit 295f852bd8ae7062e769a6de6011d08a2bd6b4c4
|
Loading…
Reference in New Issue