diff --git a/web/epiphany-graph-viewer/src/lib/EpiphanyGraphViewer.tsx b/web/epiphany-graph-viewer/src/lib/EpiphanyGraphViewer.tsx index 1a205b2..b85ae04 100644 --- a/web/epiphany-graph-viewer/src/lib/EpiphanyGraphViewer.tsx +++ b/web/epiphany-graph-viewer/src/lib/EpiphanyGraphViewer.tsx @@ -46,6 +46,8 @@ export function EpiphanyGraphViewer({ sidebarWidth = 330, showSidebar = true, overlayPanels = false, + viewportBackdrop, + viewportBackground, focusSelection = false, expandedNode, onExpandedNodeClick, @@ -238,8 +240,8 @@ export function EpiphanyGraphViewer({ return; } + const targetScale = focusedNodeScale(selectedNode, viewportSize.width, viewportSize.height); const center = nodeCenter(selectedNode); - const targetScale = clamp(transforms[activeGraphKey].scale, 0.72, 1.08); setTransforms((current) => ({ ...current, [activeGraphKey]: { @@ -386,14 +388,17 @@ export function EpiphanyGraphViewer({ overscrollBehavior: "contain", touchAction: "none", borderRadius: overlayPanels ? 0 : 28, - background: + background: viewportBackground ?? ( activeGraphKey === "architecture" ? "radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 38%), linear-gradient(160deg, #08111e 0%, #0c1624 46%, #11192c 100%)" - : "radial-gradient(circle at top right, rgba(244, 63, 94, 0.18), transparent 34%), linear-gradient(160deg, #0b1018 0%, #15111c 44%, #1a0d18 100%)", + : "radial-gradient(circle at top right, rgba(244, 63, 94, 0.18), transparent 34%), linear-gradient(160deg, #0b1018 0%, #15111c 44%, #1a0d18 100%)" + ), border: overlayPanels ? "none" : PANEL_BORDER, boxShadow: overlayPanels ? "none" : "0 18px 54px rgba(0, 0, 0, 0.3)", }} > + {viewportBackdrop} +