The group has fixed size. I want to move nodes inside the group. Problem is when I am moving the nodes they go out of group boundaries and group also moving in the background (like parallax background). I can’t use grid layout because nodes can be randomly positioned inside the group and have to save their position even when they are rotated. This is before and after image :
here’s my template code :
var _0degreeGroupTemplate =
$(go.Group, "Horizontal",
{
rotatable: true,
locationSpot: go.Spot.Center,
rotateObjectName: "GROUP_RECTANGLE",
resizable: false,
//layout: $(go.GridLayout, { comparer: go.GridLayout.smartComparer, spacing: go.Size.parse(5), isOngoing: false })
}, new go.Binding("location", "loc").makeTwoWay(),
new go.Binding("angle", "angle").makeTwoWay(),
$(go.Panel, "Auto", { name: "GROUP_RECTANGLE" },
$(go.Shape, "Rectangle", { name: "SHAPE", parameter1: 10, height: 85 + 20, fill: "lightyellow" },
new go.Binding("width", "nodeCount", function (v) { return v * 75 + 50; })),
$(go.Shape, "TopFrontSide", { name: "FRONTLINE", parameter1: 10, strokeWidth: 2, height: 85 + 20 },
new go.Binding("stroke", "frontcolor"), new go.Binding("width", "nodeCount", function (v) { return v * 75 + 50; })),
$(go.TextBlock, { margin: 5, alignment: go.Spot.TopLeft, font: "Bold 12pt Sans-Sherif", width: 20 }, new go.Binding("text", "key")),
$(go.Placeholder, { padding: 5})
)
);