fix: 避免关系图间隙太小

This commit is contained in:
chenjianxing 2021-10-29 13:50:46 +08:00 committed by jianxing
parent 7c4a6ecd96
commit ea01543ab9
4 changed files with 9 additions and 4 deletions

View File

@ -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<>();

View File

@ -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