OverviewFilesCommitsIssuesDocsReleasesPeers

godot-keet commits / cd9770b

Remove fake center node + center→hub spokes from mind-map
Only real connections remain: hub→node spokes showing cluster membership. No artificial center point or connecting lines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cd9770b77aa393c8821b7f9c86b3063e0a0e1cc7
by plankatron <fleeky@gmail.com> · 2026-02-23T13:34:40.000Z

Changed files (1) +3 -9

scripts/graph_canvas.gd +3 -9
……@@ -449,25 +449,21 @@ func _draw() -> void:
449449 draw_string(_font, center - Vector2(80, 0), "%d nodes, no positions" % _nodes.size(), HORIZONTAL_ALIGNMENT_LEFT, -1, 14, Color(0.8, 0.3, 0.3))
450450 return
451451
452 # Mind-map mode: draw spokes from center → hubs → nodes
452 # Mind-map mode: draw hub → node spokes (no fake center)
453453 if graph_layout == "mindmap" and not _hub_positions.is_empty():
454 var screen_center: Vector2 = _world_to_screen(size / 2.0 if size.x > 0 else Vector2(300, 200))
455454 for ci: int in _hub_positions.keys():
456455 var hub_screen: Vector2 = _world_to_screen(_hub_positions[ci])
457456 var color: Color = CLUSTER_COLORS[ci % CLUSTER_COLORS.size()]
458 # Center → Hub spoke
459 draw_line(screen_center, hub_screen, Color(color, 0.4), 2.0 * _zoom)
460 # Hub → Node spokes
457 # Hub → Node spokes (real connections: this node belongs to this cluster)
461458 for nid: String in _cluster_map.keys():
462459 if _cluster_map[nid] == ci and _positions.has(nid):
463460 var node_screen: Vector2 = _world_to_screen(_positions[nid])
464461 draw_line(hub_screen, node_screen, Color(color, 0.25), 1.5 * _zoom)
465 # Draw hub circles
462 # Draw hub circles with labels
466463 for ci2: int in _hub_positions.keys():
467464 var hub_screen2: Vector2 = _world_to_screen(_hub_positions[ci2])
468465 var hub_color: Color = CLUSTER_COLORS[ci2 % CLUSTER_COLORS.size()]
469466 draw_circle(hub_screen2, 6.0 * _zoom, hub_color.lightened(0.3))
470 # Hub label
471467 var label_text: String = ""
472468 if _cluster_labels.has(ci2):
473469 label_text = str(_cluster_labels[ci2].get("label", ""))
……@@ -477,8 +473,6 @@ func _draw() -> void:
477473 var text_w: float = _font.get_string_size(label_text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x
478474 var lbl_pos: Vector2 = hub_screen2 + Vector2(-text_w * 0.5, -12.0 * _zoom)
479475 draw_string(_font, lbl_pos, label_text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, hub_color.lightened(0.5))
480 # Small subtle center marker (not a node)
481 draw_circle(screen_center, 3.0 * _zoom, Color(0.4, 0.4, 0.45))
482476 else:
483477 # Standard mode: draw MI edges with adaptive alpha
484478 var edge_count: int = _edges.size()