Comments (14)
Thanks, might look at the updateNodeInternals if i encounter that issue again
Regarding the reproduction repo, sure I can provide one, but it will earliest be in 10 days time ish
from vue-flow.
Hey, thanks for reporting.
Can you tell me what exact version you were using?
Also can you provide a rough node structure?
Are the nodes inside the containers child-nodes?
from vue-flow.
Can you maybe provide a codesandbox example?
Here's a template.
I can't seem to be able to reproduce the issue locally - any resizing of the nodes results in recalculation of handle-bounds, so the edges connect properly.
Maybe I am missing something that is part of the way you structure your custom nodes that blocks the positioning.
Do all handles have a unique id? They need one if you're going to use multiple source/target handle types.
from vue-flow.
@akoboy have you seen my comments? :) I need a little help reproducing the issue properly
from vue-flow.
@akoboy ping
from vue-flow.
@akoboy ping, can you help me with a sandbox or anything which reproduces the issue?
from vue-flow.
Hi @bcakmakoglu, I also experience something similar to this, when using dynamic generated handles / dynamic height and added css transform with translate -50% to the node to make centered on the XY coordinates
I did disable this due to that bug tho. But was thinking to look into your example with Teleport and shrink animation, to see if it can be centered with javascript instead visually when dropped :)
from vue-flow.
@AlexanderYW When you dynamically generate handles you need to call the updateNodeInternals
function (or emit that event from your custom node) so the node itself is aware of new handles. Otherwise your node does not recognize handles that have been created after the node was already parsed and placed.
If possible, can you provide a minimal reproduction so I can possibly debug the issue? 😅
from vue-flow.
@AlexanderYW Anytime you can provide is fine with me =) I just can't seem to reproduce it myself for some reason.
Any resizing I have been using did not produce the issue shown here, so I must be doing something wrong in reproducing it.
from vue-flow.
@AlexanderYW
Any news for me? 😄
from vue-flow.
Sadly not @bcakmakoglu ! I had an hour on Thursday and tried doing what I did to experience the issue, but i could not reproduce it, will look at it again later today or beginning next week, I think I'm forgetting something 😵
from vue-flow.
@bcakmakoglu I'm unable to reproduce the issue again
I did a basic implementation of what i did when last time when i first met the issue, and i dont see it now. What I did was I implemented "drag n drop components to canvas" and a custom node component with transform -50% on x and y axis to center the dropped component.
Maybe the issue is i wasn't using script setup back then.. But I have no clue what it could be
from vue-flow.
@AlexanderYW I'm not sure if it's a really good idea to use transform
to position your node after dropping - that would most certainly de-sync what Vue Flow holds as the nodes' position with what you visually see as the nodes' position.
Edges don't really care about how you visualize your node components on top of the node that Vue Flow holds for you, it will always be relative to the position Vue Flow holds.
So you should rather just drop it in, add the node, and reposition it after adding it (which should not be noticable I'd assume) or, if you can set a fixed size on your nodes, just use that in a projection.
from vue-flow.
If this problem still persists, please re-open an issue with a possible reproduction of the problem, otherwise I can't really do anything about it.
from vue-flow.
Related Issues (20)
- 🐛 [BUG]: Strange edge behaviour for type 'smoothstep' and 'step' HOT 2
- 🐛 [BUG]: multi-selection-key-code property error HOT 4
- 🐛 [BUG]: Background lines mode is invalid HOT 2
- 🐛 [BUG]: <title> vue-flow is not hack with uniapp-h5-vue HOT 3
- 🐛 [BUG]: [Vue warn]: Invalid prop name: "ref" is a reserved property. HOT 2
- 🐛 [BUG]: some event Types are missing (nodeClick, nodeDoubleClick, ...) HOT 6
- 🐛 [BUG]: Register a custom component for repeated rendering HOT 2
- 🐛 [BUG]: Nuxt3 Hydration attribute mismatch HOT 9
- 🐛 [BUG]: Node added in `onMounted()` is not rendered HOT 2
- 🐛 [BUG]: Canvas captures scroll even when all scroll-related features are disabled HOT 14
- 🐛 [BUG]: useNodesData is not available in "@vue-flow/core" library, but is refernced in the documentaion, and also in examples
- 🐛 [BUG]: Devtool throws warning when using node resizer HOT 2
- 🐛 [BUG]: `pathOptions` for default edges aren't applied HOT 1
- 🐛 [BUG]: flickering on some phone browsers HOT 4
- 🐛 [BUG]: Wrong edge position with dynamic handle id HOT 5
- 🐛 [BUG]: When typing, CMD + Backspace or Shift + Backspace can delete selected element HOT 1
- 🐛 [BUG]: Docs (vueflow.dev) hangs and never loads on iOS Safari HOT 2
- 🐛 [BUG]: Auto-generated Handle ids change with position
- 🐛 [BUG]: <title> manual control <Handle /> graph line confusion HOT 1
- 🐛 [BUG]: manual control <Handle /> graph line confusion HOT 2
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 vue-flow.