Enhance graph editor: fullscreen bg, add-entity focus, color picker fix, UI polish
- Move bg-anim canvas into graph container during fullscreen so dynamic background is visible - Watch for new entity creation from graph add menu and auto-navigate to it after reload - Position color picker at click coordinates instead of 0,0 - Replace test/preview play triangle with eye icon to distinguish from start/stop - Always use port-aware bezier curves for edges instead of ELK routing - Add fullscreen and add-entity buttons to toolbar with keyboard shortcuts (F11, +) - Add confirmation dialog for relayout when manual positions exist - Remove node body stroke, keep only color bar; add per-node color picker - Clamp toolbar position on load to prevent off-screen drift - Add graph tab to getting-started tutorial - Add WASD/arrow spatial navigation, ESC reset, keyboard shortcuts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -256,8 +256,7 @@
|
||||
|
||||
.graph-node-body {
|
||||
fill: var(--card-bg);
|
||||
stroke: var(--border-color);
|
||||
stroke-width: 1;
|
||||
stroke: none;
|
||||
rx: 8;
|
||||
ry: 8;
|
||||
transition: stroke 0.15s;
|
||||
@@ -265,6 +264,7 @@
|
||||
|
||||
.graph-node:hover .graph-node-body {
|
||||
stroke: var(--text-secondary);
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.graph-node.selected .graph-node-body {
|
||||
@@ -561,6 +561,7 @@
|
||||
|
||||
.graph-node.orphan .graph-node-body {
|
||||
stroke: var(--warning-color);
|
||||
stroke-width: 1;
|
||||
stroke-dasharray: 4 3;
|
||||
}
|
||||
|
||||
@@ -679,6 +680,77 @@
|
||||
|
||||
/* ── Loading overlay for relayout ── */
|
||||
|
||||
/* ── Add entity menu ── */
|
||||
|
||||
.graph-add-entity-menu {
|
||||
position: absolute;
|
||||
z-index: 30;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 24px var(--shadow-color);
|
||||
padding: 6px;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 2px;
|
||||
min-width: 280px;
|
||||
}
|
||||
|
||||
.graph-add-entity-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-color);
|
||||
font-size: 0.8rem;
|
||||
font-family: inherit;
|
||||
text-align: left;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.graph-add-entity-item:hover {
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.graph-add-entity-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 2px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.graph-add-entity-icon {
|
||||
font-size: 1rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Fullscreen mode ── */
|
||||
|
||||
.graph-container:fullscreen {
|
||||
background: var(--bg-color);
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.graph-container:fullscreen #bg-anim-canvas {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.graph-container:fullscreen .graph-svg {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* ── Loading overlay for relayout ── */
|
||||
|
||||
.graph-loading-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
|
||||
Reference in New Issue
Block a user