@DeepPancholi wrote:
Below given is my group template. I want to disallow moving of particular groups which I am able achieve with movable property binding. But when I move any node which is inside the group, diagram automatically adjusts the groups location according to the internal node’s new location. I would like to implement a functionality in which diagram allows moving the internal node inside the group without changing the group’s location. How can I implement it?
$( go.Group, "Auto", { movable: true, subGraphExpandedChanged: function (group: go.Group) { genericService.adjustOverlap(group); } }, new go.Binding("movable", "AllowMove"), new go.Binding('location', 'Location').makeTwoWay(go.Point.stringify), $(go.Shape, this.getShape("TrustBoundary"), { strokeDashArray: this.getStrokeDashArray("TrustBoundary") }, new go.Binding('desiredSize', 'size'), new go.Binding("fill", "BackgroundColor"), new go.Binding("stroke", "isHighlighted", function (h) { return h ? "red" : "black"; }).ofObject(), new go.Binding("stroke", "BorderColor"), new go.Binding("strokeWidth", "BorderThickness")), $(go.Panel, go.Panel.Table, { name: "panelRegular", defaultAlignment: go.Spot.Center,alignment: go.Spot.TopLeft }, $(go.RowColumnDefinition, { row: 1 }), $(go.RowColumnDefinition, { row: 2 }), $(go.Panel, go.Panel.Horizontal, { row: 1, column: 0, margin: 2, stretch: go.GraphObject.Horizontal }, $("SubGraphExpanderButton", { alignment: go.Spot.Right, margin: 5 }), $(go.TextBlock, { alignment: go.Spot.LeftCenter, editable: editNodeText, margin: 5, font: "bold 18px 'Open Sans',sans-serif", portId: "T", stroke: null, fromSpot: go.Spot.Default, toSpot: go.Spot.Default, toLinkable: true, fromLinkable: true, cursor: "pointer", textValidation: currentInstance.okName }, new go.Binding("text", "FullName").makeTwoWay(), new go.Binding("stroke", "TitleColor"))), $(go.Placeholder, { row: 2, column: 0, margin: 2, alignment: go.Spot.TopLeft, padding: 5 }, new go.Binding("background", "BackgroundColor"))), params, new go.Binding("isSubGraphExpanded", "isGraphExpanded").makeTwoWay(), new go.Binding("computesBoundsAfterDrag", "letsNodeOut")); };
Posts: 2
Participants: 2