22-08-2008, 10:12 AM
Hello,
I am currently stuck on how to copy data, in fact i actually managed to copy it but then i loose some information...
To copy my graph i do:
for each( var F:NodeSprite in vis.controls.nodes)
Ar.push(F);
for each( var G:EdgeSprite in vis.controls.edges)
sv.push(G);
Then i use a little function to get back my data:
for each( var F:NodeSprite in vis.controls.nodes)
Ar.pop(F);
for each( var G:EdgeSprite in vis.controls.edges)
sv.pop(G);
But the thing is that i loose the controls... only force directed layout works fine.
How could i copy the root node? Should i use a stack?
Hope that someone can help
Regards,
vincent
I am currently stuck on how to copy data, in fact i actually managed to copy it but then i loose some information...
To copy my graph i do:
for each( var F:NodeSprite in vis.controls.nodes)
Ar.push(F);
for each( var G:EdgeSprite in vis.controls.edges)
sv.push(G);
Then i use a little function to get back my data:
for each( var F:NodeSprite in vis.controls.nodes)
Ar.pop(F);
for each( var G:EdgeSprite in vis.controls.edges)
sv.pop(G);
But the thing is that i loose the controls... only force directed layout works fine.
How could i copy the root node? Should i use a stack?
Hope that someone can help
Regards,
vincent