Forums

Full Version: Stuck on how to copy data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Reference URL's