Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Restrict relinking only to the same node

$
0
0

@SimonBrodtmann wrote:

Hi,

I want to restrict relinking only to other ports on the same node.
So I tried to use link validation:

diagram.toolManager.relinkingTool.linkValidation = function(fromnode, fromport, tonode, toport, link) {
    return tonode == link.toNode;
};

But this only works for the end of a link. For the beginning I should compare fromnode with link.fromNode.
The Problem is: I don't know which side of the link I am dragging.
Is there a way to get that information?

Thanks in advance.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles