Comments (14)
@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.
I suggest to replicate the issue using elklive.
from elkjs.
@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
Expected Behaviour
from elkjs.
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.
Hey @soerendomroes
I have tried to create two elklive.
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.
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
Here is my current ELKjs Setup with ReactFlow
https://gist.github.com/MuttakinHasib/abf85903a66c655c449c90042725dad2
from elkjs.
@soerendomroes Whenever I add a new edge or delete an edge while creating a node then the nodes are switching the sides
from elkjs.
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.
@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.
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.
@soerendomroes Which one do you prefer? in this case? I just want the layout not to switch the side
from elkjs.
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.
@soerendomroes Will you please provide an elklive example to fix this issue? Demo Elk live
from elkjs.
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.
Thanks @soerendomroes for your help ❤️
I have implemented this Example and it's looks great.
from elkjs.
Related Issues (20)
- Elk Layered alorithm not giving the expected graph HOT 13
- Space between multiple nodes targeting single node HOT 5
- Aligning nodes with parent node HOT 2
- MrTree failing to layout Flowchart properly HOT 7
- How to error if layout takes too long? HOT 4
- [Question] Need some help with `layered` layout options HOT 8
- [Question] Does ELK support the use of (Extended) Backus-Naur Form (EBNF) conventions to define layout options? HOT 4
- Generate typings for elkjs-api based on ELK HOT 1
- Question: Long edge is not going around nodes HOT 1
- Support box layout along with edges HOT 1
- How can we prevent edges from overcrowding on a single surface of a node in a layered layout? HOT 5
- Specify Position for Specific Node in ELKJS HOT 2
- Build from source error (Ubuntu 22.04 LTS) HOT 1
- _Worker is not a constructor when importing another worker with Vite and Yarn3 and PNP HOT 3
- Layout option to force global `container: root` coordinates for all children and edges HOT 1
- Port alignment ignored when connecting from child to parent HOT 2
- Layered algorithm custom wrapping/placement HOT 2
- How to align children top position on the same level? HOT 4
- Measuring execution time throws NullPointerException
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 elkjs.