Is there a Grid layout

508 views
Skip to first unread message

Michael Ellyett

unread,
Oct 4, 2021, 10:04:24 PM10/4/21
to diagrams.net Q&A
I want to use a CSV things to appear in a Parent

# parentstyle:shape=rect;autosize=1;
# identity: ID
# parent: Parent
# width:@width
# height: @height
# layout: horizontalflow
ID,Name,Parent,width,height,shape
Parent,Parent,,200,200,rect
Chlld1,Chlld1,Parent,100,10,rect
Chlld2,Chlld2,Parent,100,10,rect
Chlld3,Chlld3,Parent,100,10,rect
Chlld4,Chlld4,Parent,100,10,rect

But when I do this - it resizes the Parent object. Which I don't want and I can't find a way to have the child objects arrange in a grid as you would expect.

diagrams.net Q&A

unread,
Oct 5, 2021, 12:06:24 AM10/5/21
to diagrams.net Q&A
Automatic grid layout isn't supported, but you can use top and left and expand=0 in the parent style to place the child objects and stop parent resizing:

# identity: ID
# parent: Parent
# parentstyle:shape=rect;expand=0;
# top: top
# left: left
# width:@width
# height: @height
# ignore: Parent,top,left,width,height
ID,Name,Parent,top,left,width,height,shape
Parent,Parent,,0,0,40,40,rect
Chlld1,Chlld1,Parent,0,0,100,100,rect
Chlld2,Chlld2,Parent,100,0,100,100,rect
Chlld3,Chlld3,Parent,0,100,100,100,rect
Chlld4,Chlld4,Parent,100,100,100,100,rect

We'll fix that offset of child objects and add support for width/height auto and padding for groups in the next release.

Michael Ellyett

unread,
Oct 5, 2021, 2:16:14 AM10/5/21
to diagrams.net Q&A
Thanks. That is very helpful

Sent from iPad

On 5/10/2021, at 17:06, diagrams.net Q&A <dra...@googlegroups.com> wrote:

Automatic grid layout isn't supported, but you can use top and left and expand=0 in the parent style to place the child objects and stop parent resizing:
--
You received this message because you are subscribed to a topic in the Google Groups "diagrams.net Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drawio/pDGf3gv5X8w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drawio+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/drawio/25a618ae-590b-4c34-bf63-b774761f6580n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages