not bad
This commit is contained in:
parent
2741b93dea
commit
434f07cc4e
103 changed files with 8387 additions and 8152 deletions
|
|
@ -201,37 +201,6 @@ function lineageExpectedChildEdgeCount(component, family) {
|
|||
for (const n of component || []) count += lineageParentIds(n, idSet, family).length;
|
||||
return count;
|
||||
}
|
||||
|
||||
function lineageVisibleRelationSignature(family) {
|
||||
family = lineageEdgeFamily(family);
|
||||
const relationIndex = lineageRelationIndex(family);
|
||||
const relatedIds = new Set();
|
||||
for (const [childId, parents] of relationIndex.parentsByChild.entries()) {
|
||||
if (!parents.size) continue;
|
||||
relatedIds.add(childId);
|
||||
for (const parentId of parents) relatedIds.add(parentId);
|
||||
}
|
||||
return Array.from(relatedIds)
|
||||
.sort()
|
||||
.map(id => {
|
||||
const n = family[id] || {};
|
||||
const parents = Array.from(relationIndex.parentsByChild.get(id) || []).sort().join(",");
|
||||
const children = Array.from(relationIndex.childrenByParent.get(id) || []).sort().join(",");
|
||||
return [
|
||||
id,
|
||||
n.name || "",
|
||||
n.type || "",
|
||||
n.generation || 1,
|
||||
n.birthTime || 0,
|
||||
n.alive === false ? 0 : 1,
|
||||
n.deathReason || "",
|
||||
parents,
|
||||
children,
|
||||
].join(":");
|
||||
})
|
||||
.join("|");
|
||||
}
|
||||
|
||||
function lineageArchiveNearViewport() {
|
||||
if (!ui.archiveContent?.getBoundingClientRect) return true;
|
||||
const rect = ui.archiveContent.getBoundingClientRect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue