SGShyam G Syncfusion Team November 13, 2019 07:28 AM
We have created a sample to show how to create layers with objects initially, add a layer at runtime and show/hide the layers at runtime. Please refer to a sample and help documentation for more details.
Ok.. I see.. so rather than diagram.add and then adding to the object array this is a nice helper.. thank you.
Well, the issue now is it is adding a new layer each time.. which makes sense since the function is called 'addLayer'
I am trying to add nodes to an existing layer.. and I was using layer.objects.push()..
what is the correct way to add nodes to an 'existing' layer at runtime?
SGShyam G Syncfusion Team November 14, 2019 07:44 PM
We should use addLayer method to add a node into an existing layer at runtime. In the previous update, we have shared a code example in which we have added new node into an existing layer “layer1” at runtime.
RCraphael chanceyNovember 14, 2019 08:16 PM
I understand.. for some reason it kept adding a new layer each time.. I ended up with 10k layers :-(
I have removed layers for now.. maybe later I can come back to it
SGShyam G Syncfusion Team November 15, 2019 01:30 AM
Could you please share us more details such as exact scenario of an issue or modify the below sample.