Created
May 27, 2015 13:18
-
-
Save jrgleason/1c9e608bc0ee9ef2e778 to your computer and use it in GitHub Desktop.
Keylines add link
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chart.createLink(nodeId, newLinkId, {style: newLinkStyle}, function(linkedId){ | |
if(linkedId){ | |
var fromNode = chart.getItem(nodeId); | |
var toNode = chart.getItem(linkedId); | |
if(fromNode && toNode){ | |
//great we have them both so now we are ready to save. | |
console.log("Linking from "+JSON.stringify(fromNode)+" to "+JSON.stringify(toNode)); | |
} | |
else{ | |
console.log("One side of the link is missing"); | |
} | |
} | |
else{ | |
chart.removeItem(newLinkId); | |
} | |
removePlusIcon(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment