Its not a validation. I need to allow the link from the one more group for the tree mapping. Initially have a group -1 and -2 for tree mapping right need to allow the map from one more group like -3
GraphObject.fromLinkable and toLinkable are also part of the standard link validation mechanisms.
There are a bunch of properties that affect the ability for users to draw new links or reconnect existing ones. Everything is described in that Introduction page about Validation.
If you can implement Bindings on fromLinkable and toLinkable, that’s good. But I’m saying that if the conditions are more complicated than can be expressed in a data binding, the most general solution is to implement a linkValidation predicate, either in addition to fromLinkable and toLinkable or in place of those properties.
The way you have defined your Bindings doesn’t make sense. You have two Bindings with the target “fromLinkable” and the source “group”. Depending on the order in which the bindings are evaluated, it’s only the last one that determines whether the fromLinkable property is true or false. Why didn’t you just define the conversion function the following way?
new go.Binding("fromLinkable", "group", function(k) { return k === "Source" || k === "Source1"; }),