Add vertical branch handles and seed architecture documents from diagrams
Branch handles: Added all 6 directions (→ ← ↑ ↓ ↘ ↗) so an entire metro map can grow from a single starting node. Cardinal directions (0/90/180/270°) extend the same line, diagonals (45/315°) fork to new tracks. Documents seeded from 6 architecture diagrams: - EVOLV Digital Twin Hierarchy (ISA-88 tracks) → Gemaal 3.0 - Pumping Station dependency chain → Gemaal 3.0 - PLC/EDGE VLAN network architecture → BRIDGE - R&D Stack topology (Cloud/EDGE/OT) → BRIDGE - CoreSync network setup → BRIDGE - R&D Timeline gitflow tracks → Governance Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -505,9 +505,12 @@ const renderBranchHandles = (nodeGroup, node, allNodes) => {
|
||||
const HANDLE_R = 9 // handle circle radius
|
||||
|
||||
const branches = [
|
||||
{ deg: 0, dx: GRID_STEP_X, dy: 0, label: '→' },
|
||||
{ deg: 45, dx: GRID_STEP_X, dy: GRID_STEP_Y, label: '↘' },
|
||||
{ deg: 315, dx: GRID_STEP_X, dy: -GRID_STEP_Y, label: '↗' },
|
||||
{ deg: 0, dx: GRID_STEP_X, dy: 0, label: '→' }, // extend right
|
||||
{ deg: 90, dx: 0, dy: GRID_STEP_Y, label: '↓' }, // extend down
|
||||
{ deg: 180, dx: -GRID_STEP_X, dy: 0, label: '←' }, // extend left
|
||||
{ deg: 270, dx: 0, dy: -GRID_STEP_Y, label: '↑' }, // extend up
|
||||
{ deg: 45, dx: GRID_STEP_X, dy: GRID_STEP_Y, label: '↘' }, // fork down-right
|
||||
{ deg: 315, dx: GRID_STEP_X, dy: -GRID_STEP_Y, label: '↗' }, // fork up-right
|
||||
]
|
||||
|
||||
branches.forEach(b => {
|
||||
@@ -582,7 +585,7 @@ const renderBranchHandles = (nodeGroup, node, allNodes) => {
|
||||
.attr('font-family', "'VT323', monospace")
|
||||
.attr('font-size', '12px')
|
||||
.attr('opacity', 0.5)
|
||||
.text(occupied ? 'interchange' : (b.deg === 0 ? 'extend' : 'fork'))
|
||||
.text(occupied ? 'interchange' : ([0, 90, 180, 270].includes(b.deg) ? 'extend' : 'fork'))
|
||||
})
|
||||
.on('mouseleave', () => {
|
||||
handleGroup.selectAll('.ghost-preview').remove()
|
||||
@@ -592,7 +595,7 @@ const renderBranchHandles = (nodeGroup, node, allNodes) => {
|
||||
emit('create-node', {
|
||||
x: targetX,
|
||||
y: targetY,
|
||||
lineId: b.deg === 0 ? node.lineId : null, // null = new track
|
||||
lineId: [0, 90, 180, 270].includes(b.deg) ? node.lineId : null, // cardinal = same line, diagonal = new track
|
||||
afterNodeId: node.id,
|
||||
branchAngle: b.deg,
|
||||
parentNodeId: currentDimensionData.value?.parentNodeId ?? null,
|
||||
|
||||
Reference in New Issue
Block a user