Git Product home page Git Product logo

Comments (14)

AlexanderYW avatar AlexanderYW commented on May 10, 2024 1

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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@akoboy have you seen my comments? :) I need a little help reproducing the issue properly

from vue-flow.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@akoboy ping

from vue-flow.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@akoboy ping, can you help me with a sandbox or anything which reproduces the issue?

from vue-flow.

AlexanderYW avatar AlexanderYW commented on May 10, 2024

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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@AlexanderYW
Any news for me? 😄

from vue-flow.

AlexanderYW avatar AlexanderYW commented on May 10, 2024

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.

AlexanderYW avatar AlexanderYW commented on May 10, 2024

@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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

@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.

bcakmakoglu avatar bcakmakoglu commented on May 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.