Comments (5)
Sure, you can look at this sandbox.
I think so, maybe parent nodes can be somewhat ignored during calculating the path.
from react-flow-smart-edge.
Hey @spaceymonk , thanks for reporting it! Do you have a minimal example on CodeSandbox or a minimal GitHub repo where the error happens? This would help me debug the issue
My educated guess is that sub flows are treated as nodes and the path-finding algorithm tries to include them on it's calculations
from react-flow-smart-edge.
@spaceymonk I just launched version 2.0.0
of this library, that exposes a getSmartEdge
function instead of factories, check the new README. It accepts a nodes
argument, so you could filter out sub-flows before calling this function.
I still need to consider if it's worth to have a sub flow filter on the library itself, so I'll leave this issue open
from react-flow-smart-edge.
As a workaround you could filter the array of nodes passed to the getSmartEdge function:
const getSmartEdgeResponse = getSmartEdge({
sourcePosition,
targetPosition,
sourceX,
sourceY,
targetX,
targetY,
nodes: nodes.filter(node => node.parentNode),
options: edgeOptions,
})
from react-flow-smart-edge.
Thank you for your efforts, after upgrading to the new version and filtering the parent nodes, it worked like a charm. About your question,
@spaceymonk I just launched version
2.0.0
of this library, that exposes agetSmartEdge
function instead of factories, check the new README. It accepts anodes
argument, so you could filter out sub-flows before calling this function.I still need to consider if it's worth to have a sub flow filter on the library itself, so I'll leave this issue open
After supplying the node list, I think the expected behaviour is to correctly handle sub-flow connections.
from react-flow-smart-edge.
Related Issues (20)
- Create templates for new issues
- Update Sponsor Badge
- Diagram becomes unresponsive with large data HOT 7
- Add draggable point to smart edge HOT 4
- Update to be compatible with React Flow 11 HOT 5
- In version 3.0 Beta - Edge between 2 nodes goes away if the nodes are close to each other HOT 3
- Props that are generated when you start dragging new connection are missing for <StepEdge /> in react flow v11 HOT 2
- Make edges not overlap each other HOT 1
- Connection line appears broken when using specific grid snapping HOT 3
- Connection line appears broken when using specific grid snapping HOT 1
- Demo page/Storybook is no longer working HOT 2
- Smart Edge Not Considering nodes inside a group. HOT 2
- Edges not starting/ending on XY coords HOT 1
- Bending of edge from source HOT 4
- Edge labels getting overlapped HOT 6
- Add SmoothStepPath HOT 3
- edgeCenterX and edgeCenterY sometimes aren't calculated properly! HOT 1
- Option to propagate exceptions outside of getSmartEdge HOT 2
- engine warning when installing latest version HOT 2
- Add helper function for EdgeTypes and Options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-flow-smart-edge.