feat: smart elbow arrows — perpendicular routing, rounded corners, style filters - #113
Open
Amark19 wants to merge 4 commits into
Open
feat: smart elbow arrows — perpendicular routing, rounded corners, style filters#113Amark19 wants to merge 4 commits into
Amark19 wants to merge 4 commits into
Conversation
Two elbow-arrow gaps vs eraser.io/Excalidraw: - Style filters (width/style/colour) never applied to an elbow arrow. The panel's applyToActive only styled a `line` connector, skipping the elbow's `polyline` — so changing width/dash/colour did nothing. Now it styles both connector types. - The elbow connector had sharp corners. It now renders with rounded corners (a short quadratic fillet at each bend, capped to the leg length) plus round line joins/caps, matching the eraser/Excalidraw look. The route's first/last points stay exact, so endpoints/binding/hit-testing are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying whiteboard with
|
| Latest commit: |
178d82d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6c3b0c85.whiteboard-988.pages.dev |
| Branch Preview URL: | https://fix-elbow-smart-and-filters.whiteboard-988.pages.dev |
Elbow arrows routed as a plain dominant-axis mid-bend that ignored which side of each shape the endpoint sat on, so they cut diagonally toward a midpoint instead of leaving the shape square-on. Now a bound elbow records each end's exit direction (the outward edge normal, via binding's rerouteArrow) and the router stubs out perpendicular to each edge, then connects the stubs with a clean right-angled path (facing/perpendicular/opposed cases handled, collinear points collapsed). Free-drawn elbows and live endpoint drags still use the plain mid-bend. Combined with the rounded corners this matches the eraser.io/Excalidraw elbow look. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Amark19
force-pushed
the
fix/elbow-smart-and-filters
branch
from
August 23, 2026 19:16
377bfff to
c988a6c
Compare
A bound elbow froze its exit side to wherever it was first dropped, so moving a shape to the opposite side forced an ugly wrap-around (the arrow looped out and the tip could land off-canvas). Elbow re-routing now chooses each end's exit side dynamically from the shapes' relative positions — attaching at the midpoint of the edge that FACES the other end and exiting perpendicular — like eraser.io/Excalidraw. Straight arrows still keep their dropped attach point. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…jog) Elbow arrows now route with the shapes themselves as obstacles (grid + A*): - an arrow between distant nodes goes AROUND intervening boxes instead of cutting through them; - treating the arrow's own two endpoints as obstacles means it can no longer coil back inside them when shapes are dragged close/overlapping; - nearly-aligned facing ports snap to a straight run, killing the tiny jog. Pathfinding runs only over shapes near the arrow (kept cheap) and falls back to the built-in perpendicular mid-bend when it can't connect the ports. New utils/orthRoute.js owns the router; binding feeds it the obstacle set and a pre-computed scene route flows through setArrowEndpoints -> applyEndpointsLocal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings elbow arrows up to eraser.io/Excalidraw quality.
What changed
lineconnector; it now styles the elbow'spolylinetoo (width/style/colour + head recolour).Verified in-browser
sw 3→6,dash null→[24,18],stroke→red, head recoloured.Follow-up (not in this PR)
Obstacle-aware routing (paths that go around intervening shapes) and a curved arrow type / midpoint bend handles remain as larger, separate work.
🤖 Generated with Claude Code