| … | … | @@ -449,25 +449,21 @@ func _draw() -> void: |
| 449 | 449 | 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)) |
| 450 | 450 | return |
| 451 | 451 | |
| 452 | | # Mind-map mode: draw spokes from center → hubs → nodes |
| 452 | # Mind-map mode: draw hub → node spokes (no fake center) |
| 453 | 453 | 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)) |
| 455 | 454 | for ci: int in _hub_positions.keys(): |
| 456 | 455 | var hub_screen: Vector2 = _world_to_screen(_hub_positions[ci]) |
| 457 | 456 | 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) |
| 461 | 458 | for nid: String in _cluster_map.keys(): |
| 462 | 459 | if _cluster_map[nid] == ci and _positions.has(nid): |
| 463 | 460 | var node_screen: Vector2 = _world_to_screen(_positions[nid]) |
| 464 | 461 | draw_line(hub_screen, node_screen, Color(color, 0.25), 1.5 * _zoom) |
| 465 | | # Draw hub circles |
| 462 | # Draw hub circles with labels |
| 466 | 463 | for ci2: int in _hub_positions.keys(): |
| 467 | 464 | var hub_screen2: Vector2 = _world_to_screen(_hub_positions[ci2]) |
| 468 | 465 | var hub_color: Color = CLUSTER_COLORS[ci2 % CLUSTER_COLORS.size()] |
| 469 | 466 | draw_circle(hub_screen2, 6.0 * _zoom, hub_color.lightened(0.3)) |
| 470 | | # Hub label |
| 471 | 467 | var label_text: String = "" |
| 472 | 468 | if _cluster_labels.has(ci2): |
| 473 | 469 | label_text = str(_cluster_labels[ci2].get("label", "")) |
| … | … | @@ -477,8 +473,6 @@ func _draw() -> void: |
| 477 | 473 | var text_w: float = _font.get_string_size(label_text, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x |
| 478 | 474 | var lbl_pos: Vector2 = hub_screen2 + Vector2(-text_w * 0.5, -12.0 * _zoom) |
| 479 | 475 | 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)) |
| 482 | 476 | else: |
| 483 | 477 | # Standard mode: draw MI edges with adaptive alpha |
| 484 | 478 | var edge_count: int = _edges.size() |