Closed SamLebarbare closed 3 years ago
Hello @maxkfranz ok for you? or i missed something with edge id's?
Edge ids are not necessary, you don't need to provide them (but if you do, they must be unique). You can paste the examples in the Readme file into the demo.html file in this repo, it works without a problem:
{
"id":"cy",
"className":"foo bar",
"style":{
"border":"1px solid #ccc",
"width":"400px",
"height":"400px"
},
"global":"cy",
"elements":[
{
"data":{
"id":"one",
"label":"Node 1"
},
"position":{
"x":0,
"y":0
}
},
{
"data":{
"id":"two",
"label":"Node 2"
},
"position":{
"x":100,
"y":0
}
},
{
"data":{
"source":"one",
"target":"two",
"label":"Edge from Node1 to Node2"
}
}
],
"layout":{
"name":"preset"
}
}
Please let's know, if the problem still persists, thanks.
each edge must have an unique id, or update will fail.