Link query between node

I m working on a diagram that requires me to show the link between the nodes as the links between groups that the nodes are member of for reference the link between the store_id of staff and store_id of store should be shown between staff and store groups instead of the inner node

Yes, but what is your question? What do you want that is different from what you have?

One comment: you probably want to put some more work into defining the labels on the links. They now appear to be Shapes whose desiredSize has not been set, resulting in a default size of 100x100.

my question is how to make them appear between outer groups rather than between the inner nodes
right now the link is connected the nodes inside the group

i want the link data to be between the node but visually the link should be shown between the group that enclose them

Your requirements are still very vague.

I will guess that you want to set Link.fromShortLength and toShortLength to a small number. I don’t know exactly how long it should be – maybe 4 or 6?

i found the functionality i was looking for in tree mapper

and the link you provided

is not opening

just to be clear this function is responsible for creating liks between groups instead of nodes?
MappingLink.prototype.getLinkPoint = function(node, port, spot, from, ortho, othernode, otherport) {
var r = port.getDocumentBounds();
var group = node.containingGroup;
var b = (group !== null) ? group.actualBounds : node.actualBounds;
var op = othernode.getDocumentPoint(go.Spot.Center);
var x = (op.x > r.centerX) ? b.right : b.left;
return new go.Point(x, r.centerY);

The API link is working for me.

Did you try setting from/toShortLength? Unlike the Tree Mapper sample, the distance between the edge of the Node and the edge of its containing Group is constant in your app.

in tree mapper is it just setting the length of link ?
it is not actually setting port on the outer group?

i want the link between both last_update of each group look like thisScreenshot%20from%202019-02-08%2017-11-28

the link in data should be between last_update of both group but it should show it like it is between 2 outer groups

also i want those links to not over lap like this if other links are also made for “actoractor1” like

Instead of having each item be implemented a separate Node, collected into Groups, it sounds as if you would have been better off doing what these samples do: Entity Relationship and Record Mapper. Note in the latter sample the links are connecting individual items/ports, but one could have links connect with the whole Node instead of individual ports.

But if you want to continue having separate Nodes in Groups, you could override Link.getLinkPoint to return calling getLinkPoint on the Node.containingGroup. Set fromSpot and toSpot to go.Spot.AllSides on the Group.

yes i want to keep using nodes can u give an example of setting this Link point this is my link template right now

Sorry, I just tried what I suggested, and it didn’t do what you want.

I’m not sure there’s an easy solution to do it the way that you want, rather than the way I suggested before (not using Groups).

appreciated anyways thanks

What the MappingLink override of Link.getLinkPoint does is what you want. The problem is that you also want to spread out the link points along the sides of the Groups, and that’s not so easy to re-implement.

yes exactly i am looking into it my self too and I m at the same point as you