Nested Swimlanes

Hello,

I was wondering if your swim lanes example can be modified to have nested horizontal and vertical pools/lanes?

I tried to play with your example but as soon as i nest a pool within a group/pool all of the dynamic lane stacking behavior breaks within the pool when a lane is moved.

let me know if i going down the correct path with getting this type of behavior.

Thanks,

JJR

If you want both horizontal and vertical “lanes”, see: http://gojs.net/latest/extensions/Table.html.

Thanks for the quick reply Walter,

I am more interested in getting the auto stacking and reordering to work in sub groups then creating a table… It’s the behavior of auto scaling in a different direction within each nested group (when the user drags/creates groups/nodes around) to at least three levels deep is what I am looking for to properly visualize the display of my dataset of arrays.

Main - only contains array of group1s stacked vertically
Group1 - only contains array of group2 stacked horizontally
Group2 - only contains array of group3 stacked vertically
Group3 - only contains array of nodes stacked horizontally

I am sure it can be done with some black magic using custom layouts of each group type and causing relayouts to occur in all groups.

OK, so in your scenario there’s no overlap of having both horizontal and vertical lanes holding the same nodes. If that’s the case, you’re right – you don’t need the TableLayout.

You’ll need to combine the Swim Lanes (Horizontal) sample with the Swim Lanes (Vertical) sample. Since both samples use the same named functions and classes, you’ll need to rename at least one set of them (and I suggest renaming all of them to avoid confusion).

Then you need to make sure that the Group1 template uses PoolLayoutVertical and Group2 uses PoolLayoutHorizontal. Group3 would use GridLayout, or whatever is appropriate for positioning your non-group nodes.

I’m not sure about the lane resizing tools. That also depends on what functionality you want to offer to the user.

Good luck – although it’s conceptually simple to do what I think you want, the code may seem complicated. I suggest that initially you ignore the regular node and link templates and all of the other extras that might complicate the definitions of the group templates. Maybe completely skip resizing lanes until everything else works – that way you can avoid bothering with the tools and the custom adornments.