Giter Club home page Giter Club logo

Comments (14)

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

@soerendomroes The False/B side's children nodes should be placed on the right side. and the True/A side's children nodes should be placed on the left side.

you can see on the 2nd screenshot the SMS node moved to the left side but it should be on the right.

from elkjs.

soerendomroes avatar soerendomroes commented on August 15, 2024

I suggest to replicate the issue using elklive.

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

@soerendomroes
I'm Sorry, I actually don't know how can I demonstrate elklive based on my project. But I hope you will get the issue. I request you to check the demo https://client-journey.vercel.app/

try to add a condition node then add another node under false port. you will see that the new node is placed on the left side but it shouldn't. It should be placed on the right side. I don't know how can I achieve this, please help me.

I have attached my ELK setup #273 (comment)

Current Behaviour

image

Expected Behaviour

image

from elkjs.

soerendomroes avatar soerendomroes commented on August 15, 2024

Hi, I wanted you to recreate your graph since I want to know the order of nodes and edges in our model as well as additional layout properties.

elk.layered.crossingMinimization.forceNodeModelOrder may be responsible for this but without a model recreated in elklive, I can only guess.

https://rtsys.informatik.uni-kiel.de/elklive/elkgraph.html

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

Hey @soerendomroes

I have tried to create two elklive.

Example One URL

Here always the Yes Node and Yes Port will place on the left side and the No Node and No Port will place on the right side.

image

Example Two URL

Here the No_Node and the No_Port will always place on the right side though I don't have any nodes under the condition node of yes port

image

Here is my current ELKjs Setup with ReactFlow

https://gist.github.com/MuttakinHasib/abf85903a66c655c449c90042725dad2

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

@soerendomroes Whenever I add a new edge or delete an edge while creating a node then the nodes are switching the sides

from elkjs.

soerendomroes avatar soerendomroes commented on August 15, 2024

If Yes and No ports should always be in that order, I suggest to set portConstraints: FIXED_ORDER on them.
The issue in your first model persists since elklive changes its version back to 0.7.1 which does not support all option you are using.

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

@soerendomroes Do I need to maintain the edge insertion in an order? Example, I am removing a node and edge and after that, I am adding a new node and edges.

something like edges.push(newEdge) to add a new edge

from elkjs.

soerendomroes avatar soerendomroes commented on August 15, 2024

If you constrain the port order, you only need to maintain the port order.

If you want to also constrain the node order via forceNodeModelOrder you need to set considerModelOrder.strategy. This would change the edge/port order if it is free to enforce the order of nodes if the initial solution using the given order is not crossing minimal.

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

@soerendomroes Which one do you prefer? in this case? I just want the layout not to switch the side

from elkjs.

soerendomroes avatar soerendomroes commented on August 15, 2024

If you want the port to be in a specific order, I would constrain the ports and not use the model order strategies. If your nodes and edges are ordered based on the time you create them, it does not make sense to use model order.

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

@soerendomroes Will you please provide an elklive example to fix this issue? Demo Elk live

from elkjs.

soerendomroes avatar soerendomroes commented on August 15, 2024

Here is the port constraints option.
And here is the model order option that enforces node model order (remember to switch to 0.8.2).

from elkjs.

MuttakinHasib avatar MuttakinHasib commented on August 15, 2024

Thanks @soerendomroes for your help ❤️
I have implemented this Example and it's looks great.

from elkjs.

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.