From 4a9a5119ed0b0190b4fcb130c2ed4b012821505e Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 15 Jun 2023 14:33:37 -0700 Subject: [PATCH] fix grid label font size in tala --- d2graph/d2graph.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 76046e377..409e59cf0 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -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 {