fix: nil labelPosition
This commit is contained in:
parent
d33efa28f2
commit
54250d00dd
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ func place(obj *d2graph.Object) (float64, float64) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.Contains(*obj.LabelPosition, "INSIDE") && obj.LabelPosition != nil {
|
if obj.LabelPosition != nil && !strings.Contains(*obj.LabelPosition, "INSIDE") {
|
||||||
if strings.Contains(*obj.LabelPosition, "_TOP_") {
|
if strings.Contains(*obj.LabelPosition, "_TOP_") {
|
||||||
// label is on the top, and container is placed on the bottom
|
// label is on the top, and container is placed on the bottom
|
||||||
if strings.Contains(nearKeyStr, "bottom") {
|
if strings.Contains(nearKeyStr, "bottom") {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue