Hi,
How can swap link directions ? Namley, set the ‘from’ to ‘to’ and visa versa ?
I noticed that the link has ‘toNode’ and ‘fromNode’ attributes.
Can i set these value by :
link.toNode=…
link.fromNode…
OR
by calling setDataPrprerty(link.data,“fromNode”…) ?
Please advise
Either way will work. Be sure to execute all of the changes within a transaction.
When calling Model.setDataProperty, be sure to use the correct data property names. Or else call GraphLinksModel.setFromKeyForLinkData and setToKeyForLinkData.