Hi Team,
I have created a group template which has SubGraphExpanderButton and a text box.
Whenever I select the group, I want to exclude SubGraphExpanderButton and a text box from the group selection. Because both this should work on selection of the group as well. Now I am unable to click the SubGraphExpanderButton and not able to edit the text box.
Please help me on this.
Following are the screenshots:
Before selection:
After selection:
Code Snippet:
var me = this;
var groupSelectionAdornmentTemplate = $(
go.Adornment,
'Auto',
$(go.Placeholder)
);
var groupTemplate = $(
go.Group,
'Vertical',
me.descriptionTooltip(),
new go.Binding('isSubGraphExpanded', 'expanded').makeTwoWay(),
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(
go.Point.stringify
),
{ background: 'transparent' },
{
mouseDragEnter: me.groupMouseDragEnter,
mouseDragLeave: me.groupMouseDragLeave
},
{ toEndSegmentLength: 40, fromEndSegmentLength: 40 },
{ fromSpot: go.Spot.Bottom, toSpot: go.Spot.Top },
{ avoidable: false, cursor: 'pointer' },
{ isLayoutPositioned: true },
{ handlesDragDropForMembers: true },
{ mouseDrop: me.autoGroup.bind(me) },
{ layout: me.makeDigraphLayout() },
{ selectionAdornmentTemplate: groupSelectionAdornmentTemplate },
{ ungroupable: true, selectable: true, resizable: false, movable: true },
$(
go.Panel,
'Auto',
{ stretch: go.GraphObject.Horizontal },
{ name: 'PANEL' },
$(
go.Panel,
'Horizontal',
{
defaultAlignment: go.Spot.Top,
margin: new go.Margin(8, 4, 8, 4),
stretch: go.GraphObject.Horizontal
},
me.makeExpandCollapseButton(),
$(
go.TextBlock,
{ name: 'GROUP_TITLE_TEXT', stroke: '#212122' },
{ textValidation: me.validateGroupName.bind(me) },
{
isMultiline: false,
editable: true,
font: '500 16px Outfit, sans-serif',
margin: new go.Margin(0, 0, 0, 8)
},
new go.Binding('text').makeTwoWay()
),
$(go.Placeholder, { margin: 5 })
),
$(
go.Shape,
'RoundedRectangle',
{ name: 'SHAPE', isPanelMain: true },
{ strokeWidth: 1, strokeDashArray: [10, 4] },
new go.Binding('stroke', '', me.groupingStroke).ofObject(),
new go.Binding('fill', '', me.groupingFill).ofObject()
),
)
);