removed unused processesseessess
This commit is contained in:
parent
348f355eb2
commit
4fdc567e08
158 changed files with 1317 additions and 3351 deletions
|
|
@ -219,7 +219,6 @@ function renderArchive() {
|
|||
uiCache.archivePendingDirtyAfterRun = false;
|
||||
return;
|
||||
}
|
||||
const renderStarted = performance.now();
|
||||
lineageSetArchiveStaleStatus(false);
|
||||
if (uiCache.archiveRenderTimer) {
|
||||
clearTimeout(uiCache.archiveRenderTimer);
|
||||
|
|
@ -227,9 +226,7 @@ function renderArchive() {
|
|||
}
|
||||
uiCache.archiveVersion = version;
|
||||
uiCache.archiveFamilyVersion = world.familyVersion || 0;
|
||||
uiCache.archiveLastScheduleFamilyVersion = world.familyVersion || 0;
|
||||
uiCache.archiveLastRenderedAt = performance.now();
|
||||
uiCache.lastArchiveWindow = "";
|
||||
if (!uiCache.archiveHtmlCache) uiCache.archiveHtmlCache = new Map();
|
||||
const activeCacheKeys = new Set();
|
||||
const token = `${version}:${Math.random().toString(36).slice(2)}`;
|
||||
|
|
@ -245,7 +242,6 @@ function renderArchive() {
|
|||
return;
|
||||
}
|
||||
const splitComponents = components.flatMap(lineageSplitByActualEdges).filter(c => c.length);
|
||||
uiCache.archiveRows = splitComponents;
|
||||
if (!splitComponents.length) {
|
||||
ui.archiveContent.innerHTML = `<div class="selected-info empty">\u751f\u304d\u3066\u3044\u308b\u69cb\u6210\u54e1\u3092\u6301\u3064\u5bb6\u7cfb\u306f\u307e\u3060\u3042\u308a\u307e\u305b\u3093\u3002</div>`;
|
||||
lineageRestoreArchiveScroll(scrollState);
|
||||
|
|
@ -288,12 +284,6 @@ function renderArchive() {
|
|||
const renderDirtiedAgain = uiCache.archivePendingDirtyAfterRun || (world.familyVersion || 0) !== familyVersion;
|
||||
uiCache.archiveRenderRunning = false;
|
||||
world.familyTreeDirty = renderDirtiedAgain;
|
||||
if (uiCache.archiveDiagnostics) {
|
||||
uiCache.archiveDiagnostics.renders = (uiCache.archiveDiagnostics.renders || 0) + 1;
|
||||
uiCache.archiveDiagnostics.lastMs = Math.round((performance.now() - renderStarted) * 10) / 10;
|
||||
uiCache.archiveDiagnostics.lastFamilies = splitComponents.length;
|
||||
uiCache.archiveDiagnostics.lastNodes = splitComponents.reduce((sum, component) => sum + component.length, 0);
|
||||
}
|
||||
if (renderDirtiedAgain) {
|
||||
uiCache.archivePendingDirtyAfterRun = false;
|
||||
scheduleArchiveWindowRender();
|
||||
|
|
@ -321,54 +311,13 @@ function resetArchiveRenderState() {
|
|||
uiCache.archiveRenderRunning = false;
|
||||
uiCache.archiveScheduled = false;
|
||||
uiCache.archivePendingOffscreen = false;
|
||||
uiCache.archivePendingWhileRunning = false;
|
||||
uiCache.archivePendingDirtyAfterRun = false;
|
||||
uiCache.archiveLastHiddenCheckAt = -Infinity;
|
||||
uiCache.archiveLastScheduleFamilyVersion = null;
|
||||
uiCache.archiveVersion = "";
|
||||
uiCache.archiveFamilyVersion = null;
|
||||
uiCache.archiveRelationSignature = "";
|
||||
uiCache.archiveRows = [];
|
||||
uiCache.lastArchiveWindow = "";
|
||||
uiCache.archiveHtmlCache?.clear?.();
|
||||
}
|
||||
|
||||
function validateFamilyTree() {
|
||||
const issues = world.validateFamily ? [...world.validateFamily()] : [];
|
||||
const rendered = new Map();
|
||||
document.querySelectorAll("[data-family-tarinai-id]").forEach(node => {
|
||||
const id = node.getAttribute("data-family-tarinai-id");
|
||||
rendered.set(id, (rendered.get(id) || 0) + 1);
|
||||
});
|
||||
for (const [id, count] of rendered.entries()) {
|
||||
if (count > 1) issues.push({ type: "duplicate-render-node", id, count });
|
||||
}
|
||||
for (const component of uiCache.archiveRows || []) {
|
||||
for (const n of component || []) {
|
||||
if (n?.id && !rendered.has(n.id)) issues.push({ type: "missing-render-node", id: n.id });
|
||||
}
|
||||
}
|
||||
document.querySelectorAll(".lineage-family-tree[data-lineage-child-edges]").forEach((section, index) => {
|
||||
const expectedEdges = Number(section.getAttribute("data-lineage-child-edges") || 0);
|
||||
const renderedEdges = Number(section.getAttribute("data-lineage-rendered-child-edges") || 0);
|
||||
const expectedGroups = Number(section.getAttribute("data-lineage-child-groups") || 0);
|
||||
const renderedPaths = Number(section.getAttribute("data-lineage-child-paths") || 0);
|
||||
const pathCount = section.querySelectorAll(".lineage-links .child-link").length;
|
||||
if (renderedEdges !== expectedEdges) {
|
||||
issues.push({ type: "render-child-edge-count-mismatch", familyIndex: index, expectedEdges, renderedEdges });
|
||||
}
|
||||
if (expectedEdges > 0 && pathCount < 1) {
|
||||
issues.push({ type: "missing-render-child-link", familyIndex: index, expectedEdges, pathCount });
|
||||
}
|
||||
if (expectedGroups > 0 && pathCount < expectedGroups) {
|
||||
issues.push({ type: "missing-render-child-link-group", familyIndex: index, expectedGroups, pathCount });
|
||||
}
|
||||
if (renderedPaths !== pathCount) {
|
||||
issues.push({ type: "render-child-path-count-mismatch", familyIndex: index, renderedPaths, pathCount });
|
||||
}
|
||||
});
|
||||
return issues;
|
||||
}
|
||||
function scheduleArchiveWindowRender() {
|
||||
if (typeof archiveAutoUpdateEnabled === "function" && !archiveAutoUpdateEnabled()) {
|
||||
uiCache.archiveScheduled = false;
|
||||
|
|
@ -404,6 +353,4 @@ function schedulePendingArchiveRender() {
|
|||
scheduleArchiveWindowRender();
|
||||
}
|
||||
|
||||
window.validateFamilyTree = validateFamilyTree;
|
||||
window.familyTreeDiagnostics = () => ({ ...(uiCache.archiveDiagnostics || {}) });
|
||||
window.resetArchiveRenderState = resetArchiveRenderState;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue