GoJs Version 1.6.18
I have a group template with a vertical panel layout and 2 panels. The top panel holds the group title and the group expander button. The bottom panel holds the placeholder for the group child nodes. Both the diagram and the group have a LayeredDigraphLayout applied (same layout parameters but different layout instances).
When the animation manager is enabled, expanding a group causes the group to move up and to the left if it contains any child nodes. When the animation manager is disabled, the group stays in place and the child nodes are correctly revealed under the group title panel without causing the group itself to move.
Do you have any idea what could cause this? I’m temporarily disabling the animation manager in the expander button click event as a work around.
I get the incorrect result even when using a very simple group template from the docs with my diagram.
diagram.groupTemplate =
$(go.Group, "Auto",
$(go.Shape, "Rectangle",
{ fill: "gold" }),
$(go.Panel, "Vertical",
{ margin: 5,
defaultAlignment: go.Spot.Left },
$(go.Panel, "Horizontal",
$("SubGraphExpanderButton",
{ margin: new go.Margin(0, 3, 5, 0) }),
$(go.TextBlock, "Group")
),
$(go.Placeholder)
)
);
I do get the correct result (no movement) in my browser for the SubGraphExpanderButtons example (which appears to be animated) on the following page.
http://gojs.net/latest/intro/buttons.html
So there must be some other variable in my diagram which is causing this problem.
Thanks,
Ryan