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

Connection line appears broken when using specific grid snapping #45

Open
DraksBG opened this issue Dec 21, 2022 · 1 comment
Open

Connection line appears broken when using specific grid snapping #45

DraksBG opened this issue Dec 21, 2022 · 1 comment
Labels
bug Something isn't working pinned This should not be closed by bots on inactivity

Comments

@DraksBG
Copy link

DraksBG commented Dec 21, 2022

Describe the Bug

Is your feature request related to a problem? Please describe.
Hello @tisoap we are having the following situation when using SmartEdge with GridSnapping

we are having custome grid snaping position and when we connect a parent node to three child nodes at some point the connection gets broken and it's not always a straight line.

My question is, is there a way always to be sure to make the connection straight when using StepEdge, can you suggest a fix if you have ever come across such a problem.

The code for what we use is as follows for the gird snapping and smartEdge:

export const snapGridValue: SnapGridValueProps = { snapGrid: [90, 60], snapToGrid: true, backgroundGap: [90, 60], sizeCrossDots: 40, backgroundGridColor: '#e1e1e1', }

const getSmartEdgeResponse = getSmartEdge({ sourcePosition, targetPosition, sourceX, sourceY, targetX, targetY, nodes: updatedNodes, options: { drawEdge: svgDrawStraightLinePath, generatePath: pathfindingJumpPointNoDiagonal, }, })

Minimal Example

https://codesandbox.io/s/trusting-rubin-nus8rh

Steps to Reproduce the Bug or Issue

Add three nodes
Connect them to the parent node and spred them one to another
and observe the behavior of the connection line.

Expected behavior

Connection line should be straight after the first step edge

Screenshots or Videos

image
image-2022-12-01-08-52-49-896

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

@DraksBG DraksBG added the bug Something isn't working label Dec 21, 2022
@tisoap tisoap added the pinned This should not be closed by bots on inactivity label Dec 26, 2022
@antipasvasil
Copy link

antipasvasil commented Feb 7, 2023

Hi, @tisoap is there will be any solution/s of the reported problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned This should not be closed by bots on inactivity
Projects
None yet
Development

No branches or pull requests

3 participants