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 #44

Closed
DraksBG opened this issue Dec 13, 2022 · 3 comments
Closed

Connection line appears broken when using specific grid snapping #44

DraksBG opened this issue Dec 13, 2022 · 3 comments
Labels
enhancement New feature or request stale Nobody commented for a while

Comments

@DraksBG
Copy link

DraksBG commented Dec 13, 2022

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, }, })

Describe the solution you'd like

We have been thinking that we might need to create a custom function for svgDrawStraightLinePath if there is no other way.

Describe alternatives you've considered

Other way is to have a custom implementation for a position algorithm because in order for the nodes to always stayed at some position that will not allow for the connections to become broken, but there is a lot of different cases and there always might be some discrepancies

Additional context

Here is an image of the issue that we are tying to solve.

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

@DraksBG DraksBG added the enhancement New feature or request label Dec 13, 2022
@tisoap
Copy link
Owner

tisoap commented Dec 13, 2022

Hey @DraksBG ! What You're describing seems to be an bug, could you please create a new issue but using the "Bug report" option instead? Thanks!

Screenshot 2022-12-13 at 12 35 15

@github-actions
Copy link

This issue is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale Nobody commented for a while label Dec 21, 2022
@tisoap
Copy link
Owner

tisoap commented Dec 26, 2022

Reopened as a bug:
#45

@tisoap tisoap closed this as completed Dec 26, 2022
Repository owner locked as resolved and limited conversation to collaborators Dec 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stale Nobody commented for a while
Projects
None yet
Development

No branches or pull requests

2 participants