From d9c5bf1bd4e7cf9de248881672d820941ca34126 Mon Sep 17 00:00:00 2001 From: tegwick Date: Tue, 19 May 2026 00:16:57 +0200 Subject: [PATCH] Add graph selection anchors --- railiance_fabric/graph_explorer_ui.py | 134 +++++++++++++++++++++++++- tests/test_graph_explorer.py | 3 + 2 files changed, 136 insertions(+), 1 deletion(-) diff --git a/railiance_fabric/graph_explorer_ui.py b/railiance_fabric/graph_explorer_ui.py index 2278120..f9bd25f 100644 --- a/railiance_fabric/graph_explorer_ui.py +++ b/railiance_fabric/graph_explorer_ui.py @@ -129,6 +129,55 @@ def graph_explorer_page() -> str: box-shadow: 0 12px 30px rgba(23, 32, 51, .12); } .map-controls button { min-width: 54px; } + .selection-anchor { + position: absolute; + z-index: 5; + display: none; + width: 0; + height: 0; + pointer-events: none; + transform: translate(-50%, -100%); + } + .selection-anchor::before { + content: ""; + position: absolute; + left: -1px; + top: -36px; + width: 2px; + height: 28px; + border-radius: 999px; + background: #111827; + box-shadow: 0 1px 2px rgba(23, 32, 51, .28); + } + .selection-anchor::after { + content: ""; + position: absolute; + left: -6px; + top: -10px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 10px solid #111827; + filter: drop-shadow(0 1px 1px rgba(23, 32, 51, .24)); + } + .selection-anchor-label { + position: absolute; + left: 12px; + top: -48px; + max-width: 220px; + overflow: hidden; + border: 1px solid var(--line); + border-radius: 8px; + background: rgba(255, 255, 255, .96); + box-shadow: 0 12px 30px rgba(23, 32, 51, .12); + color: var(--text); + font-size: 12px; + line-height: 1.25; + padding: 6px 8px; + text-overflow: ellipsis; + white-space: nowrap; + } .button-row { display: flex; flex-wrap: wrap; gap: 8px; } .meta { color: var(--muted); font-size: 12px; margin: 0; } .pill { @@ -203,6 +252,9 @@ def graph_explorer_page() -> str: +