clientIO / clientIO/joint

[feat]: Manhattan router should support ports inside the element's body.

Open
#2,763 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
5.4k
Forks
893
Avg merge
3d 3h
Merged PRs (30d)
26

Description

Current versus expected behaviour

[!NOTE]
This is a follow up from https://github.com/clientIO/joint/discussions/2738#discussioncomment-10737651

Hi @kumilingus !

I've been playing around with the code you gave me in the manhattan-router discussion the other day and I saw something that I thought is worth mentioning. Certain situations lead to the manhattan router creating extra vertices:

image

I'm aware that this might be (¿?) caused by the step option and because of the way collisions are detected (¿?), which is fine, but if I set the step value to 1 (actually any value below 7), manhattan just stops avoiding any obstacles at all.

image

I tried debugging the code and re-reading all the docs, and I believe there is a correlation between step and gridSize, but setting the later to the same value doesn't fix the problem.

Why isn't manhattan avoiding obstacles when step < 7 ?

Steps to reproduce
  1. Go to https://codesandbox.io/p/sandbox/runtime-dream-8ffcy9
  2. Change step to any value below 7
  3. Move the cells and check if the link is avoiding the cells
Version

4.0.4

What browsers are you seeing the problem on?

Chrome, Safari

What operating system are you seeing the problem on?

Mac

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 with the linked CodeSandbox reproduction and test the Manhattan router with step values below 7, then compare the behavior with the reported gridSize relationship. Done means the router continues avoiding moved cells at those step values in Chrome and Safari; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.