clientIO / clientIO/joint

Link head out of place with "metro" router.

Open
#1,246 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.