hello
I'm using Angular diagram and when I'm adding second layer on run time ( exactly like example on documentation) and then I'm trying to save with saveDiagram method but there is error
there is no problem when diagram have only one layer
this first layer
public layers: LayerModel[] = [
{
id: 'customLayer1',
visible: true,
lock: false,
addInfo: {
describtion: 'default layer',
order:-1
}
}
];
and this is how im adding layer
addLayer() {
let newLayer: LayerModel = {
objects:[],
id: `customLayer${(this.diagram?.layers.length || 0) + 1}`,
visible: true,
lock: false,
addInfo: {
describtion: '',
order : '-1'
},
zIndex:-1
}
this.diagram?.addLayer(newLayer, []);
this.diagram?.setActiveLayer(newLayer.id || '');
this.getCtrl('id').setValue(newLayer.id);
this.selectedLayer.setValue(newLayer.id);
}
and then im adding node from the pallet , all my nodes are native
if i add node to diagram.layers[0] there is no problem
but when im using this code
this.diagram?.setActiveLayer(customLayer2);
then draging node from pallet , and now
saveDiagram is not working any more.
Note: version of diagram "@syncfusion/ej2-angular-diagrams": "^20.4.42",
Note : in both layeres i have only Native nodes.