Draw self-loop edges (vertex -> itself) as arcs on the center node #4

Closed
opened 2026-10-04 04:49:47 +00:00 by alopez · 0 comments
Owner

Requested by Alfred 2026-10-04 (follow-up to explorer#2 and meikaku#17, which added CANVAS_PAINTER.arc).

Today RADIAL_LAYOUT treats an edge whose other vertex is the center itself like any neighbour, so a self-loop shows up as a duplicate of the center node on the orbit.

Wanted:

  • RADIAL_LAYOUT (meikaku lib/graph/radial_layout.mei): an edge with other.id == center id is a self-loop. Don't make an orbit node for it; keep it (and its count) for the renderer; unique_neighbour_count excludes it.
  • explorer on_canvas_draw: draw each self-loop as an arc (CANVAS_PAINTER.arc) just outside the center node, several loops fanned around it, with the edge label at the loop's outer point.
  • Tests: graph_radial_layout conformance case with a self-loop (+ parallel self-loops).
Requested by Alfred 2026-10-04 (follow-up to explorer#2 and meikaku#17, which added CANVAS_PAINTER.arc). Today RADIAL_LAYOUT treats an edge whose other vertex is the center itself like any neighbour, so a self-loop shows up as a duplicate of the center node on the orbit. Wanted: - RADIAL_LAYOUT (meikaku lib/graph/radial_layout.mei): an edge with other.id == center id is a self-loop. Don't make an orbit node for it; keep it (and its count) for the renderer; unique_neighbour_count excludes it. - explorer on_canvas_draw: draw each self-loop as an arc (CANVAS_PAINTER.arc) just outside the center node, several loops fanned around it, with the edge label at the loop's outer point. - Tests: graph_radial_layout conformance case with a self-loop (+ parallel self-loops).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
alopez/meikaku-explorer#4
No description provided.