How find the first lane in swimLane in gojs?

How find the first lane in swimLane in gojs?

Actually we want to add top resize icon for first lane in a swimLane.

image

If you want to find the top lane, you can look for the lane group with the smallest y position.

var top = myDiagram.findTopLevelGroups().first();
myDiagram.nodes.each(function(n) {
  if (n instanceof go.Group && n.category !== "Pool" && n.position.y < top.position.y) top = n;
});

If you want to add a resize handle, add it to the custom resizeAdornmentTemplate on the group template.