Hi, everybody. I have a problem. I’m adding an icon via a Panel in the upper right-hand corner of a group. But it gets cut off and doesn’t come out completely. I tried changing the padding of the Placeholder and the alignment of the Panel, but it still doesn’t work. Thanks in advance.
Here’s the group’s code.
this.dia.groupTemplateMap.add("OfGroups",
$(go.Group, "Auto",
{
mouseDrop: finishDrop,
handlesDragDropForMembers: true,
memberValidation: samePrefix,
mouseDragEnter: function(e, grp, prev) { highlightGroup(e, grp, true); },
mouseDragLeave: function(e, grp, next) {
highlightGroup(e, grp, false);
},
memberAdded: updateGroupCount,
memberRemoved: updateGroupCount,
computesBoundsAfterDrag: true,
movable: true,
groupable: false,
copyable: false,
layout:
$(go.GridLayout,
{
wrappingWidth: 1, alignment: go.GridLayout.Position,
cellSize: new go.Size(1, 1), spacing: new go.Size(12, 12)
})
},
new go.Binding("background", "isHighlighted", function(h) { return h ? "rgba(255,0,0,0.2)" : "transparent"; }).ofObject(),
$(go.Shape, "RoundedRectangle",
new go.Binding("fill", "background"),
new go.Binding("spot1", "spot1"),
new go.Binding("spot2", "spot2"),
{ stroke: "#E2E2EA", strokeWidth: 1, parameter1: 15}),
$(go.Panel, "Vertical",
$(go.Panel, "Horizontal",
new go.Binding("width", "width"),
new go.Binding("height", "height"),
$(go.TextBlock,
{
alignment: go.Spot.Top,
editable: false,
margin: 12,
opacity: 0.75,
},
new go.Binding("font", "font"),
new go.Binding("stroke", "stroke"),
new go.Binding("text", "text").makeTwoWay())
),
$(go.Placeholder,
{padding: 10, alignment: go.Spot.Center}),
),
$(go.Panel, "Auto",
{ alignment: new go.Spot(1, 0, -4, -10) },
$(go.Shape, "Circle", { fill: "#FFFFFF", strokeWidth: 0}),
$(go.TextBlock, { name: "COUNT" })
)
));