Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link as magnet? #1299

Open
charleskessler opened this issue May 19, 2020 · 2 comments
Open

Link as magnet? #1299

charleskessler opened this issue May 19, 2020 · 2 comments
Labels
candidate feature A candidate for a built-in JointJS feature / plugin.

Comments

@charleskessler
Copy link

Is it possible to have a link or a link label be a magnet?

I'd like to be able to do something similar to the mix bus demo, set the intersection circle (link end/start point) as a magnet to draw new connections

image

@kumilingus
Copy link
Contributor

The magnets on links are passive only right now (an existing link can be connected to the magnet - you can not add a new link by dragging the magnet).
We need to move the magnets logic from the ElementView to CellView.

For now, you need to listen to the paper event link:pointerdown or a custom event (https://resources.jointjs.com/docs/jointjs/v3.1/joint.html#dia.attributes.event) and create a link yourself and change the link's target on link:pointermove/link:pointerup.

@kumilingus kumilingus added the candidate feature A candidate for a built-in JointJS feature / plugin. label May 19, 2020
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Please remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale This issue/PR shows no activity for an extended period of time. label Jun 22, 2023
@kumilingus kumilingus removed the stale This issue/PR shows no activity for an extended period of time. label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate feature A candidate for a built-in JointJS feature / plugin.
Projects
None yet
Development

No branches or pull requests

2 participants