Hello Syncfusion Team,
We're observing a z-index issue with Diagram control (we're using the latest version but this issue occurs for previous versions as well).
This one is a little hard to explain on paper.
Assume we insert three symbols on the diagram canvas. Their z-index get assigned (by the diagram control) as follows:
Now let's delete symbol-2 (which has z-index = 1). So the canvas will now look like:
Now add a new symbol-4, it'll get assigned z-index = 3. The canvas will now look like:
Now save the diagram json (by calling SaveDiagram()).
Now reload from saved diagram json (by calling LoadDiagram())
Now add a new symbol-5. Weirdly, it'll get assigned z-index = 1 (it'll occupy the 'hole' left behind by deleted symbol-2 which had z-index = 1). The canvas will now look like:
Adding another new symbol-6 will give it z-index = 4. Canvas will look like:
In summary: After reloading diagram from JSON, the max recorded z-index is forgotten and new symbols will be inserted into "holes" (if any). This is bad for the user experience (since many times these new symbols with lower z-index are completely covered by older symbols with higher z-index).
Only if all "holes" are filled, then max recorded z-index is used.
I've created a stackblitz demo for this issue (this demo uses a slightly older version of the diagram component, but the same issue repro'es on latest version as well).
https://stackblitz.com/edit/diagram-zindex-hole?file=src/app/app.component.ts
Please let me know if any additional details are needed.
Thanks,
-Mithun