Hi
We’re busy investigating converting some of our GoXam diagrams to GoJS diagrams.
In some of our GoXam diagrams we have swimlane containers that have a header and a body section.
See:
As you can see, the header section has an initial minimum width but it can grow if the header text starts to get very long.
We’re trying to replicate the same behaviour in GoJS using Table Panels. Unfortunately, we’re having some difficulty getting the header column to dynamically grow in width, if needed.
See:
As you can see we’ve kind of replicated the behaviour but the location of the group part seems to shift to the left when the header section resizes to accommodate long text.
This is our current group template that we’re using for the swimlane:
var swimlaneHorizontal = $m(go.Group, "Table",
{ locationSpot: go.Spot.Center, height: 150, width: 400 },
new go.Binding("location", "location", go.Point.parse), //the initial location of the group
new go.Binding("width", "width"),
new go.Binding("height", "height"),
$m(go.Panel, "Auto",
{ column: 0, minSize: new go.Size(30, 0) },
new go.Binding("height", "height"),
$m(go.Shape, "Rectangle", {fill: "white"}),
$m(go.TextBlock, new go.Binding("text", "text"), {angle: 270, margin: 4})
),
$m(go.Panel, "Auto",
{ column: 1, stretch: go.GraphObject.Fill },
new go.Binding("height", "height"),
$m(go.Shape, "Rectangle", {fill: "white"}),
$m(go.Placeholder)
)
);
Thanks
Justin