Not able to drag the mouse within a lane to select multiple nodes

I want to select several nodes in the lane by dragging the mouse pointer. But just take the lane and drag it as in the image.

I was thinking about deactivating the pool and thus be able to select several nodes inside the carill. Or is there another way to do it?


I assume you started from the original Swim Lanes sample, Swim Lanes.

The idea is to make the Shape that is the background for the lane (a Group) not accept mouse or touch events. You can do that by setting GraphObject.pickable to false. Do that both on the “SHAPE” Shape in the lane Group and the unnamed background/border Shape of the “Pool” Group.

When I tried this I was surprised that it still didn’t work. The reason is that the shared groupStyle function also sets the Panel.background of the whole Group to be “transparent”. So you need to comment out that line of the options, the one that says “// can grab anywhere in bounds”, since you don’t want to do that any more.

Now the DragSelectingTool works when the mouse down happens in the background of a lane Group.

Note that the user can still select and drag a lane Group by clicking or dragging in the header of the lane.

1 Like