This commit is contained in:
Felix Klement committed 2026-10-02 20:47:03 +02:00
1 parent 5a2d49c17f
commit 49850fe485
10 files changed
+46 -22

No files matched your search

+8 -4
View File
@@ -13,7 +13,9 @@ export interface Node { x: number; y: number; label?: Label; dot?: 'main' | 'sub
export interface Edge { points: Pt[]; tick?: boolean; faint?: boolean; dashed?: boolean; group?: string }
export interface Box { x: number; y: number; w: number; h: number; dashed?: boolean }
export interface Text { x: number; y: number; text: Label; anchor?: 'start' | 'end' | 'middle'; strong?: boolean; group?: string }
export interface Layout { w: number; h: number; nodes: Node[]; edges: Edge[]; boxes?: Box[]; texts?: Text[]; fontMain?: number; fontSub?: number }
/* `lit` names, per group, the other groups a hover on it keeps lit: a path that leaves one node
and ends at another belongs to both. */
export interface Layout { w: number; h: number; nodes: Node[]; edges: Edge[]; boxes?: Box[]; texts?: Text[]; fontMain?: number; fontSub?: number; lit?: Record<string, string[]> }
export interface Pair { wide: Layout; tall: Layout }
const RING = 36;
@@ -124,11 +126,13 @@ export function verdict(g: Groups[2]): Pair {
nodes: [dot(140, y, L.finding, 'finding'), ...context.nodes, ...ctx.nodes, ...s1.nodes, ...s2.nodes, ...tools.nodes, ...v.nodes, ...outcomes.nodes],
edges: [
...ctx.edges, ...tools.edges, ...outcomes.edges,
...chain([[140, y], [380, y], [640, y], [920, y], [1220, y]]),
{ points: [[640, y], [640, top], [1220, top], [1220, y]], tick: true },
...chain([[140, y], [380, y], [640, y], [920, y]]),
{ points: [[920, y], [1220, y]], tick: true, group: 'escalation' },
{ points: [[640, y], [640, top], [1220, top], [1220, y]], tick: true, group: 'static' },
],
texts: [...v.texts, { x: 930, y: top - 12, text: L.certain, anchor: 'middle' }, { x: 780, y: y + 30, text: splitTwo(L.unsure), anchor: 'middle' }],
texts: [...v.texts, { x: 930, y: top - 12, text: L.certain, anchor: 'middle', group: 'static' }, { x: 780, y: y - 52, text: splitTwo(L.unsure), anchor: 'middle' }],
fontMain: 19, fontSub: 17,
lit: { static: ['verdict'], escalation: ['verdict'], verdict: ['static'] },
};
const tall = spine([
{ title: L.finding },