elk
elk copied to clipboard
Replace 'spacing.labelNode' with 'nodeLabels.margin'
Consider
// TODO only applied to outside labels?
spacing.labelNode: 30
nodeLabels.padding: "[top=10.0,left=10.0,bottom=10.0,right=10.0]"
node n3 {
nodeLabels.placement: "H_CENTER V_TOP INSIDE"
label "label1"
label "label2"
}
node n4 {
nodeLabels.placement: "H_CENTER V_TOP OUTSIDE"
label "label1"
label "label2"
}
which yields

The labelNode is only applied to the OUTSIDE labels, while padding is used on the inside. @le-cds is it possible that labelNode is partly deprecated in this case after your node label placement changes?
Maybe it's reasonable to replace the labelNode by a new margins property for the outside?
Sure, we could replace the label-node spacing by margins, which would be configurable for all four sides independently.
You don't see a bug here, do you? I'd consider this expected behaviour?
Not a bug but inconsistent behavior I'd say.
If we were introduce nodeLabels.margins, spacing.nodeLabel would be obsolete, wouldn't it? In that case we should
- a) either remove it or
- b) use it - if it's set - to fill all values of
paddingandmarginwithnodeLabel.
I kind of like b) since that would preserve the possibility to control all spacings using the spacing group.
Ah, I see why you find it inconsistent.
If we were introduce
nodeLabels.margins,spacing.nodeLabelwould be obsolete, wouldn't it?
Absolutely. I guess I'd simply remove it. The spacing options are already way too complex...
Feel free to participate in the PR :).