Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Vertical Group?

$
0
0

@cobolstinks wrote:

Getting started with groups in GoJS but I want to have my shapes stacked vertically in the group, and I want the group text positioned top center in the group.

Here is my current group definition:

myDiagram.groupTemplate =
            $(go.Group, "Vertical",
                $(go.Panel, "Auto",
                    $(go.Shape, "Rectangle",  // surrounds the Placeholder
                        {
                            fill: "rgba(128,128,128,0.33)"
                        }),
                    $(go.Placeholder,    // represents the area of all member parts,
                        { padding: 5 })  // with some extra padding around them
                ),
                $(go.TextBlock,         // group title
                    { alignment: go.Spot.TopCenter, font: "Bold 12pt Sans-Serif" },
                    new go.Binding("text", "label"))
            );

but when it renders it looks like this:

What is wrong in my config?

Thanks!

Posts: 8

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles