Link head out of place with "metro" router.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.4k
- Forks
- 893
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 26
Description
Hi, something is happening with the links head using "metro" router. When I have 2 boxes connected by a link, depending of the boxes position, the head of the link seams to move out of its natural place.
It happens the same with bouth APIS, "joint.dia.Link" and " joint.shapes.standard.Link".
Here is my Link code:
var CustomLink = joint.dia.Link.define('standard.Link', {
attrs: {
line: {
connection: true,
stroke: '#3498DB',
strokeWidth: 3,
strokeLinejoin: 'round',
targetMarker: {
'type': 'path',
'd': 'M 10 -5 0 0 10 5 z'
}
}
},
router: { name: 'metro' },
connector: { name: 'rounded', args: { radius: 20 } }
}, {
markup: [{
tagName: 'path',
selector: 'wrapper',
attributes: {
'cursor': 'pointer'
}
}, {
tagName: 'path',
selector: 'line',
attributes: {
'fill': 'none'
}
}]
});
To solve the problem I'm using "manhattan router":
router: { name: 'manhattan', args: { padding: 20 } },
This is the JointJS Google Group thread:
https://groups.google.com/forum/#!topic/jointjs/BQc1qjR6pJ4
Greetings, Emilio.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported link layout with the supplied CustomLink definition, the metro router, and the standard link APIs. Compare the result with the manhattan router configuration and review the linked Google Group thread for context. Done means the link head remains correctly positioned for different box arrangements while using the metro router.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100