I did check both pages before writing this question,
I have the same query, how can changing the fill or stroke on group selection change the group selection adornment shape ? I tried implementing but doesnt seem to help.
but can I apply a selection custom adornment ? I tried many ways but doesnt seem to work. Have a look at my code below.
Also thanks for raising concern over my previous question, I understand that can be hard, but can take it up afterwards.
$( go.Group,
go.Group.Spot,
{
layerName: "BlockLayer",
locationSpot: go.Spot.TopLeft
},
{
// This is to prevent the overlap both while creating and dragging
dragComputation: avoidNodeOverlap
},
{
selectionAdorned: false,
selectionObjectName: "SHAPE",
// custom selection adornment: a blue rectangle
selectionAdornmentTemplate: $(
go.Adornment,
"Auto",
$(go.Shape, { stroke: "dodgerblue", fill: null }),
$(go.Placeholder, { margin: -1 })
)
},
{ resizable: true, resizeObjectName: "SHAPE" },
{ reshapable: true },
$(
go.Shape,
{
name: "SHAPE",
fill: groupFill,
stroke: groupStroke
},
new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(
go.Size.stringify
),
new go.Binding("angle").makeTwoWay(),
new go.Binding("geometryString", "geo").makeTwoWay()
),
{
resizable: true,
resizeObjectName: "SHAPE"
// because the gridSnapCellSpot is Center, offset the Group's location
// locationSpot: new go.Spot(0, 0, CellSize.width / 2, CellSize.height / 2),
// zOrder:1
},
// always save/load the point that is the top-left corner of the node, not the location
new go.Binding("position", "pos", go.Point.parse).makeTwoWay(
go.Point.stringify
),