Skip to content

ui: Fix flow arrowhead rendering for vertical arrow separation#2802

Merged
stevegolton merged 3 commits intomainfrom
dev/sg/fix-flow-arrowhead-rendering
Sep 3, 2025
Merged

ui: Fix flow arrowhead rendering for vertical arrow separation#2802
stevegolton merged 3 commits intomainfrom
dev/sg/fix-flow-arrowhead-rendering

Conversation

@stevegolton
Copy link
Member

@stevegolton stevegolton commented Sep 2, 2025

Currently, flow arrowheads are omitted when the start and end points are close together, but the proximity check only considers the x-axis distance. This causes arrowheads to be hidden even when flows span different tracks with adequate vertical separation, making it difficult to discern arrow direction.

This patch calculates wether the start and end points are far enough away in either axis, instead of using only the x-axis distance to determine whether to render the arrowhead.

Also fixed a bug in the arrowhead rendering logic where the arrow body emerges from the arrowhead tip instead of the back of the arrowhead.

Before:
image

Arrowhead presence logic fised (but with arrowhead rendering bug):
image

Final:
image

Currently, flow arrowheads are omitted when the start and end points
are close together, but the proximity check only considers the x-axis
distance. This causes arrowheads to be hidden even when flows span
different tracks with adequate vertical separation, making it difficult
to discern arrow direction.

This patch calculates the Manhattan distance between start and end
points instead of using only the x-axis distance to determine whether
to render the arrowhead.

Change-Id: I5e639705d2d8417f2bfaa3eb371249492ba6eced
@stevegolton stevegolton requested a review from a team as a code owner September 2, 2025 20:12
@github-actions
Copy link

github-actions bot commented Sep 2, 2025

🤖 Hi @stevegolton, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

…ther the arrow is long enough in either axis, rather than using Manhattan distance

Change-Id: I0093d798dbc6c0cd210262b347e059a06a6fe7cd
Change-Id: I4391d4b1ef0e575c6b473343f84207316fef32a8
@stevegolton stevegolton merged commit 3b87105 into main Sep 3, 2025
19 checks passed
@stevegolton stevegolton deleted the dev/sg/fix-flow-arrowhead-rendering branch September 3, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants