-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1116,11 +1116,6 @@ func adjustDimensions(obj *d2graph.Object) (width, height float64) { | |
width = go2.Max(width, float64(obj.LabelDimensions.Width)) | ||
} | ||
} | ||
|
||
// special handling | ||
if obj.HasOutsideBottomLabel() || obj.Icon != nil { | ||
height += float64(obj.LabelDimensions.Height) + label.PADDING | ||
This comment has been minimized.
Sorry, something went wrong.
gavin-ts
Contributor
|
||
} | ||
} | ||
|
||
if obj.Icon != nil && obj.Shape.Value != d2target.ShapeImage { | ||
|
@@ -1189,11 +1184,6 @@ func cleanupAdjustment(obj *d2graph.Object) { | |
} | ||
} | ||
|
||
// special handling to start/end connections below label | ||
if obj.HasOutsideBottomLabel() { | ||
obj.Height -= float64(obj.LabelDimensions.Height) + label.PADDING | ||
This comment has been minimized.
Sorry, something went wrong.
gavin-ts
Contributor
|
||
} | ||
|
||
// remove the extra width/height we added for 3d/multiple after all objects/connections are placed | ||
// and shift the shapes down accordingly | ||
dx, dy := obj.GetModifierElementAdjustments() | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
this is the code that will trim connections to an outside bottom label's box. Therefore, we don't need to make the shape taller, then shorter after layout to get the connection to end up at the bottom of the label.