Closed michalhabala closed 2 months ago
Hi! Thank you for the suggestion! This is certainly something we are considering.
@chuckzel, will you have time to look at this, or should I try to address it?
I will add support for this in the coming weeks. If you need the functionality sooner, it is possible to use sizeGetter
and transform
options for this. For example, these options result in a left-right layout:
opts: {
sizeGetter: (n) => {
const dims = n.layoutDimensions();
return { w: dims.h, h: dims.w };
},
transform: (n, pos) => ({ x: pos.y, y: pos.x })
}
Awesome, thank you!
Thank you very much! We are okay with waiting a few weeks for this feature. Thanks for this great layout; we can't wait to include it in our app.
Sorry for the longer wait, direction
option is now added in 0.2.0
direction: "LR" | "RL" | "TB" | "BT" = "TB"; // the direction of the tree, left to right, right to left, top to bottom, bottom to top
Awesome! Thank you very much. I was rather occupied with other projects, so I'm glad you had time to look into this :)
Would it be possible to add support for different layout directions? Typically, users want the resulting tree to be oriented left-right or top-down, and I don't see any option to change the direction like in the other tree layouts in Cytoscape. Thank you.