kieler / elkjs

ELK's layout algorithms for JavaScript
Other
1.76k stars 97 forks source link

How to cuts with "Manually Specified Cuts" layered option #244

Closed DimitriChauvel closed 3 months ago

DimitriChauvel commented 12 months ago

Hi, I want to make manual cuts in my VerticalParent node, but I don't know what the value I need to specify in org.eclipse.elk.layered.wrapping.cutting.cuts looks like, I need it for elkt and JavaScript. Thank you.

Manually Specified Cuts

node VerticalParent {
    org.eclipse.elk.algorithm: elk.layered
    elk.direction: DOWN
    elk.layered.wrapping.cutting.strategy: MANUAL
    org.eclipse.elk.layered.wrapping.cutting.cuts: [2] // Not Working

    nodeLabels.placement: "H_LEFT V_TOP OUTSIDE"

    label "VerticalParent"

    node n1 { label "n1" }
    node n2 { label "n2" }
    node n3 { label "n3" }
    node n4 { label "n4" }

    edge n1 -> n3
    edge n2 -> n4
    edge n3 -> n2
}

EDIT: I'm sorry for the bug label I couldn't change it.

soerendomroes commented 12 months ago

This is indeed a bug. Elkt does not support lists and hence cuts cannot be manually added and the switch statement deciding what strategy to use does not work for manual cuts in elk 0.8.X.

DimitriChauvel commented 12 months ago

Ok thank you, do you know if it's supported by previous versions or by json and JS ?

soerendomroes commented 12 months ago

It will also not work in previous versions, only with the nightly Java build. I think that this also effects json but I don't know for sure.

It does not matter whether you can input a list since the strategy cannot be selected if you do not use the nightly build. In the nightly build you cannot input the list of Manual cuts in textual form but you have to do it programatically.