fix: typo

This commit is contained in:
donglixiaoche 2023-03-27 22:48:02 +08:00
parent 8e64ada77b
commit 66f620f57b
No known key found for this signature in database
GPG key ID: 3190E65EBAD6D6E2

View file

@ -117,12 +117,12 @@ func place(obj *d2graph.Object) (float64, float64) {
}
} else if strings.Contains(*obj.LabelPosition, "_LEFT_") {
// label is on the left, and container is placed on the right
if strings.Contains(nearKeyStr, "bottom") {
if strings.Contains(nearKeyStr, "right") {
x += float64(*obj.LabelWidth)
}
} else if strings.Contains(*obj.LabelPosition, "_RIGHT_") {
// label is on the right, and container is placed on the left
if strings.Contains(nearKeyStr, "bottom") {
if strings.Contains(nearKeyStr, "left") {
x -= float64(*obj.LabelWidth)
}
} else if strings.Contains(*obj.LabelPosition, "_BOTTOM_") {