Find part from coordinates in diagram

Hi,
I need to find the part or the lane in which I am dropping my new node because I am using group property for my multiple lanes and need to place that particular node in that lane in which I am dropping my node

Can you please let me know how do I get that particular lane in which I am dropping my node so that I can get the lane key and set it into my node group.

var newlanedata = {
category: “Lane”,
text: “New Lane”,
color: “white”,
isGroup: true,
loc: go.Point.stringify(new go.Point(lane.location.x, lane.location.y + 1)),
size: go.Size.stringify(size),
group: “Lane-01”
};
// and add it to the model
Diagram.model.addNodeData(newlanedata);

Are you calling this code from a mouseDrop event handler on the group or on some object within the group? If so, the second argument will be the object that has that event handler declared on it, from which you can get its part, which will be the Group.

Yes, I am using mouseDrop event but it’s a custom jQuery event of Jstree so I didn’t get the argument as an object over there so I need to find the object from coordinates.

So you are not dragging from another Diagram, but you are using jQuery. Have you seen how HTML Drag and Drop is implemented?