--
This commit is contained in:
parent
5ed977788c
commit
f500279abd
93 changed files with 1893 additions and 1198 deletions
|
|
@ -52,8 +52,8 @@ function lineageFastLayoutNeeded(nodes, idSet, family) {
|
|||
}
|
||||
|
||||
function lineageLayoutRowsFast(rows, idSet) {
|
||||
const NODE_W = 132;
|
||||
const NODE_H = 84;
|
||||
const NODE_W = 150;
|
||||
const NODE_H = 104;
|
||||
const SIBLING_GAP = 22;
|
||||
const ROW_GAP = 116;
|
||||
const LEFT_PAD = 82;
|
||||
|
|
@ -159,14 +159,23 @@ function lineageFamilyHtml(component, index, family, signature = "") {
|
|||
|
||||
function renderArchive() {
|
||||
if (!ui.archiveContent) return;
|
||||
// Auto update OFF now means "do not keep refreshing", not "hide the tree".
|
||||
// Draw the current snapshot once so the family tree is always available under
|
||||
// the event UI, then mark it stale when the family data changes.
|
||||
if (typeof archiveAutoUpdateEnabled === "function" && !archiveAutoUpdateEnabled()) {
|
||||
uiCache.archiveScheduled = false;
|
||||
if (!uiCache.archiveVersion) {
|
||||
ui.archiveContent.innerHTML = `<div class="selected-info empty">\u5bb6\u7cfb\u56f3\u306e\u66f4\u65b0\u306fOFF\u3067\u3059\u3002\u300c\u66f4\u65b0\u300d\u3092ON\u306b\u3059\u308b\u3068\u63cf\u753b\u3057\u307e\u3059\u3002</div>`;
|
||||
} else if (world.familyTreeDirty) {
|
||||
lineageSetArchiveStaleStatus(true);
|
||||
if (uiCache.archiveVersion && world.familyTreeDirty) {
|
||||
const hasRenderedGraph = Boolean(ui.archiveContent.querySelector(".lineage-family-tree, [data-family-tarinai-id]"));
|
||||
const familyHasEdges = Object.values(world.family || {}).some(n => (n?.parents || []).length || (n?.children || []).length);
|
||||
// If the first snapshot was empty, keep OFF but allow the first real
|
||||
// family graph to appear. Subsequent changes are marked stale.
|
||||
if (!hasRenderedGraph && familyHasEdges) {
|
||||
resetArchiveRenderState();
|
||||
} else {
|
||||
lineageSetArchiveStaleStatus(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (uiCache.deferArchiveUntil && performance.now() < uiCache.deferArchiveUntil) return;
|
||||
uiCache.deferArchiveUntil = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue