Expanding a group, then clicking off it messes up the layout

Scenario:

  1. I drag a group from a palette to the diagram.

  2. Then using the expander button I expand the group.

  3. Once the group is expanded, I click away from it on the diagram.

As you can see, the group layout isn’t preserved. Has anyone encountered this before? Suggestions?

I’ve attached 3 screenshots:



That’s very odd. Does your Group template have its own Group.layout? If so, what is it? Also, which version of GoJS are you using?

It’s normally the case that hiding or showing a Node or a Link will cause the responsible Layout to be invalidated, causing a layout to happen again soon. That’s certainly the case when expanding a subgraph – the whole subgraph becomes visible, so the whole subgraph is laid out again. You can prevent that by either setting Layout.isOngoing to false or by turning off the relevant flags on Part.layoutConditions on all of your Nodes and Links.

For more details, please read: http://gojs.net/latest/intro/layouts.html

Walter, you are a genius if no one has told you yet. Adding a layout to the group template resolved the issue.

Thank you.