Hi Walter,
I am using placeholder in my grouptemplate and when i rotate the group panel the shapes it contains are moving outside this panel Also it doesn’t has smart size for all the shapes because i have set desired size of this panel to desiredSize:new go.Size(270, 200),if i set minsize and use placeholder it cover all the shapes accurately but in this case it stops resizing.What i want is group panel should cover all sizes shapes properly and all the shapes should resize and rotate with the group panel.
here is my groupTemplate code
myDiagram.groupTemplate =
GO(go.Group, "Auto",
{rotatable:true,resizable:true,resizeObjectName: "SHAPE",locationObjectName: "SHAPE",resizeAdornmentTemplate: //showing resize panel in right bottom corner only
GO(go.Adornment, "Spot",
GO(go.Placeholder, { padding: 5/2 }), // half the SHAPE.strokeWidth
GO(go.Shape, { alignment: go.Spot.Right, width: 6, height: 6, stroke: "dodgerblue", fill: "lightblue", cursor: "e-resize" }),
GO(go.Shape, { alignment: go.Spot.BottomRight, width: 6, height: 6, stroke: "dodgerblue", fill: "lightblue", cursor: "se-resize" }),
GO(go.Shape, { alignment: go.Spot.Bottom, width: 6, height: 6, stroke: "dodgerblue", fill: "lightblue", cursor: "s-resize" })
),ungroupable: true},
new go.Binding("location", "loc",go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding("angle", "ang").makeTwoWay(),
GO(go.Panel, "Auto",
GO(go.Shape, "RoundedRectangle", // surrounds the Placeholder
{ name:"SHAPE",
parameter1: 14,
fill: "transparent",
desiredSize:new go.Size(270, 200),
stroke:"transparent"
// minSize: new go.Size(270, 200)
}),
// new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify),
// GO(go.Placeholder, // represents the area of all member parts,
// { padding: 5}), // with some extra padding around them
GO(go.TextBlock,
{
font: "bold 14px sans-serif",
stroke:"black",
alignment: go.Spot.Center,
wrap: go.TextBlock.WrapFit,
editable: true
},
new go.Binding("font", "fontstyle"),
new go.Binding("text", "text").makeTwoWay(),
new go.Binding("stroke", "textcolor"))
)
);
here is the diagram i get
currently its resizing and rotating correctly but the problem is i want to use plcaeholder and minsize in group template so that group panel contains the whole shape.