From fe1b07663015bcbf11ca7fef6aef0ab08cea18b4 Mon Sep 17 00:00:00 2001 From: haoyuren <13851610112@163.com> Date: Wed, 11 Mar 2026 13:48:52 -0500 Subject: Add 12 major features: community detection, timeline, filters, analysis tools, groups, minimap, undo/redo, and more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Features added: - Leiden-CPM community detection with adjustable resolution and convex hull overlays - Timeline with met date on nodes/edges and playback slider - Tag-based subgraph filtering - Betweenness centrality ranking (bridge people identification) - Island/disconnected component detection - Community overlap analysis with Venn diagram - Manual node grouping with visual hulls and context menu integration - Notes/备注 field per person - Multi-graph support (create/switch/delete independent networks) - Undo/Redo (Ctrl+Z/Y) with 50-step history - Command palette (Ctrl+F) for quick node search - Minimap for navigation in large graphs - Keyboard shortcuts (Ctrl+N, ?, Delete, Escape) Co-Authored-By: Claude Opus 4.6 --- index.html | 1096 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 1055 insertions(+), 41 deletions(-) diff --git a/index.html b/index.html index 91f4ed7..ed7e5c3 100644 --- a/index.html +++ b/index.html @@ -538,6 +538,51 @@ svg { width: 100%; height: 100%; } .path-edge-line { width:40px; height:2px; background:var(--border); } .path-edge-label { font-size:9px; color:var(--text2); margin-top:2px; max-width:60px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } +/* ===== Community Hulls ===== */ +.community-hull { fill-opacity: 0.07; stroke-opacity: 0.35; stroke-width: 2; stroke-dasharray: 6 3; pointer-events: none; } +.community-label { font-size: 11px; fill: var(--text2); text-anchor: middle; pointer-events: none; opacity: 0.7; } +.group-hull { fill-opacity: 0.06; stroke-opacity: 0.5; stroke-width: 2; pointer-events: none; } +.group-label { font-size: 13px; font-weight: 600; fill-opacity: 0.6; text-anchor: middle; pointer-events: none; } + +/* ===== Timeline ===== */ +#timeline-bar { position:fixed; bottom:52px; left:50%; transform:translateX(-50%); background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:8px 16px; z-index:50; display:none; align-items:center; gap:12px; min-width:400px; } +#timeline-slider { flex:1; accent-color:var(--accent); } +#timeline-date { font-size:12px; color:var(--text2); min-width:80px; text-align:center; } + +/* ===== Tag Filter Panel ===== */ +#tag-filter-panel { position:fixed; top:48px; left:50%; transform:translateX(-50%); background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 16px; z-index:51; max-width:600px; max-height:300px; overflow-y:auto; display:none; box-shadow:0 8px 30px rgba(0,0,0,0.4); } + +/* ===== Command Palette ===== */ +#command-palette { position:fixed; top:20%; left:50%; transform:translateX(-50%); width:400px; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:12px; z-index:300; box-shadow:0 20px 60px rgba(0,0,0,0.5); display:none; } +#cmd-search { font-size:16px; padding:12px; border-radius:12px; } +#cmd-results { max-height:300px; overflow-y:auto; margin-top:8px; } +.cmd-item { padding:8px 12px; border-radius:8px; cursor:pointer; font-size:13px; display:flex; justify-content:space-between; } +.cmd-item:hover, .cmd-item.active { background:var(--surface2); } +.cmd-item .cmd-sub { font-size:11px; color:var(--text2); } + +/* ===== Minimap ===== */ +#minimap { position:fixed; bottom:60px; left:16px; width:180px; height:130px; background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; z-index:50; cursor:pointer; display:none; } +#minimap-canvas { width:100%; height:100%; } +#minimap-viewport { position:absolute; border:1.5px solid var(--accent); border-radius:2px; background:rgba(108,124,255,0.1); pointer-events:none; } + +/* ===== Misc new ===== */ +.island-item { padding:8px 12px; border-radius:8px; margin-bottom:4px; background:var(--surface2); cursor:pointer; font-size:13px; } +.island-item:hover { background:var(--border); } +.island-isolated { border-left:3px solid var(--danger); } +.dimmed { opacity:0.1 !important; } +.venn-circle { fill-opacity:0.15; stroke-width:2; } +.graph-list-item { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; border-radius:8px; margin-bottom:4px; } +.graph-list-item:hover { background:var(--surface2); } +.graph-list-item.active { border-left:3px solid var(--accent); background:var(--surface2); } +#graph-switcher { display:flex; gap:6px; align-items:center; margin-top:8px; } +#graph-switcher select { flex:1; padding:4px 8px; font-size:12px; } +textarea { resize:vertical; min-height:60px; font-family:inherit; width:100%; padding:8px 12px; background:var(--surface2); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:13px; outline:none; } +textarea:focus { border-color:var(--accent); } +#undo-redo-bar { display:flex; gap:4px; } +#undo-redo-bar button:disabled { opacity:0.3; cursor:default; } +.shortcut-row { display:flex; justify-content:space-between; padding:6px 0; font-size:13px; border-bottom:1px solid var(--border); } +.shortcut-key { background:var(--surface2); padding:2px 8px; border-radius:4px; font-family:monospace; font-size:12px; } + /* ===== Scrollbar ===== */ ::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; } @@ -595,6 +640,10 @@ svg { width: 100%; height: 100%; } @@ -693,6 +758,11 @@ svg { width: 100%; height: 100%; } + + + + + @@ -710,6 +780,18 @@ svg { width: 100%; height: 100%; } + +
+ + +
+ +
+
+
+ + +
@@ -738,6 +820,25 @@ svg { width: 100%; height: 100%; }
+ +
+ + + 全部 +
+ + +
+ +
+
+ + +
+ +
+
+