Merge pull request #1412 from gavin-ts/fix-grid-label-size

fix grid label font size in tala
This commit is contained in:
gavin-ts 2023-06-15 16:10:57 -07:00 committed by GitHub
commit b8436358fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -9,3 +9,4 @@
#### Bugfixes ⛑️
- Fixes edge case in compiler using dots in quotes [#1401](https://github.com/terrastruct/d2/pull/1401)
- Fixes grid label font size for TALA [#1412](https://github.com/terrastruct/d2/pull/1412)

View file

@ -584,7 +584,8 @@ func (obj *Object) Text() *d2target.MText {
}
if obj.OuterSequenceDiagram() == nil {
if obj.IsContainer() && obj.Shape.Value != "text" {
// Note: during grid layout when children are temporarily removed `IsContainer` is false
if (obj.IsContainer() || obj.IsGridDiagram()) && obj.Shape.Value != "text" {
fontSize = obj.Level().LabelSize()
}
} else {