OK, I’ll assume those click, mouseEnter, and mouseLeave events don’t matter, since I don’t have their definitions anyway.
By the way, setting stretch probably doesn’t make any difference. Unless you are using a layout that cares about that.
Did you need the Group to be selectable? If not, just set that to false in your group template.
Did you want users to be able to click on the Group (not on a member Node or Link) and select the Group? Or to drop Parts into the Group? If not, you could set pickable to false on the Group. Or set pickable to false on the Shape surrounding the Placeholder. Users would still be able to interact with the member Parts (unless you set pickable to false on them too). Note that pickable only controls mouse events for that object (and for Panels their contained objects). It would not change the selectability of the Group.
If you want to do what you said originally in this forum topic, you could place the PanningTool in front of the DraggingTool in the ToolManager.mouseMoveTools list, so that the panning tool would take precedence over the dragging tool:
myDiagram.toolManager.mouseMoveTools.insertAt(1, myDiagram.toolManager.panningTool);
Now the user can start panning at any point in the diagram. I don’t know if that is what you want, though, since that effectively totally disables dragging.
Perhaps instead you want to customize the DraggngTool.canStart method so that it doesn’t start running if what it’s over is a Group. (Or choose any other predicate, as appropriate to your app.)
$(go.Diagram, . . .,
{
"draggingTool.findDraggablePart": function() {
const diagram = this.diagram;
const part = diagram.findPartAt(diagram.firstInput.documentPoint, false);
if (part === null) return null;
if (part instanceof go.Group) return null;
if (part.canMove() || part.canCopy()) return part;
return null;
},
. . .
Here I’m overriding the method by just setting it on the diagram’s instance of the DraggingTool, but you could define a separate subclass and override the method if you prefer.