Skip to content

feat(joint-react): link presets + PortalLinkView#3268

Draft
kumilingus wants to merge 25 commits intoclientIO:devfrom
kumilingus:link-presets
Draft

feat(joint-react): link presets + PortalLinkView#3268
kumilingus wants to merge 25 commits intoclientIO:devfrom
kumilingus:link-presets

Conversation

@kumilingus
Copy link
Copy Markdown
Contributor

Summary

Link Presets (@joint/react/presets)

New subpath export with ready-made Paper configurations for link routing:

  • straightLinks() — straight-line links
  • orthogonalLinks() — right-angle routing with rounded corners
  • curvedLinks() — bezier curves with outwards tangent direction

Options: mode, sourceOffset, targetOffset, straightWhenDisconnected, cornerType, cornerRadius

PortalLinkView

Custom LinkView with CSS class hooks (jr-link--connecting, jr-link--snapped) during arrowhead drag.

Custom anchors & connection points

smartAnchor, outwardsConnectionPoint, modelCenterAnchor, connectionPoint + wrappers for disconnected state.

Demo

Interactive "Link Presets" story with 6 elements (ports, root, magnets) and configurable options.

Test plan

  • yarn typecheck — clean
  • yarn jest — all tests pass
  • Storybook: link presets demo works

🤖 Generated with Claude Code

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.

1 participant