Hi,
This is my group template. In that I have two way binded the group lcaotion.
Group template:
myDiagram.groupTemplate =
$(go.Group, "Vertical",
{
resizable: true, resizeObjectName: "SHAPE",
selectionObjectName: "SHAPE",
locationObjectName: "SHAPE",ungroupable: true,
mouseDrop: finishDrop
},
new go.Binding("location").makeTwoWay(),
$(go.TextBlock, { font: "bold 11pt sans-serif" },
new go.Binding("text", "key")),
$(go.Shape, { name: "SHAPE", fill: "whitesmoke" },
new go.Binding("desiredSize").makeTwoWay())
);
SelectionGrouped Listener:
myDiagram.addDiagramListener(“SelectionGrouped”, function(e) {
console.log(e.diagram.selection.first().location) // returning NaN, NaN
console.log(e.diagram.selection.first().data) // Here value is printing
})
In this listener, at first time I am always getting location as NaN. Can you tell me how to get group location in SelectionGroupped?