Skip to content

fix: include bezier control points in connection hitbox calculation#275

Open
Antamansid wants to merge 1 commit intomainfrom
bezier_points
Open

fix: include bezier control points in connection hitbox calculation#275
Antamansid wants to merge 1 commit intomainfrom
bezier_points

Conversation

@Antamansid
Copy link
Collaborator

Bezier connections were not selectable by click because their control points were not included in the bounding box.
The RBush spatial tree rejected hits on curved segments that extended beyond the start→end rectangle.

Added a collectBBoxPoints() hook to BaseConnection that subclasses can override to contribute additional points to the bounding box.
BlockConnection overrides it to include bezier control points and label geometry. The change is fully backward-compatible.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Antamansid Antamansid marked this pull request as ready for review March 21, 2026 16:36
@Antamansid Antamansid requested a review from draedful as a code owner March 21, 2026 16:36
Copy link
Collaborator

@draedful draedful left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, please add e2e tests for the interactivity of bezier links.
I would like to have at least two edge cases:

  • the target point is to the right of the source for horizontal graphs
  • the target point is above the source for vertical graphs

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.

3 participants