Diagram Load Broken

Hello

I was looking at the Diagram serialization demo from the demo page here: https://ej2.syncfusion.com/angular/demos/#/material3/diagram/serialization

I saved a diagram. Then I opened the stackblitz:

https://stackblitz.com/edit/angular-ctdnfv?file=src%2Fapp.component.ts

The problem is that I can only load the saved diagram once. Please see my attached video. I also include the diagram shown in the video.






Attachment: 202309_34632a9d.zip

3 Replies

SJ Sivaranjith Jeyabalan Syncfusion Team September 21, 2023 09:31 AM UTC

Hi Kabe,

The reported issue is not related with the diagram and it is due to uploader component. We cannot upload file with same name in the uploader component which is used to load the diagram. However, you have the option to clear the previously uploaded file by utilizing the clearAll method of the uploader component, to upload the same file. Please find the sample and code example below for reference.

 

this.diagram.loadDiagram((event.target as FileReader).result.toString());

let fileUploader = (document.getElementById('fileupload') as any).ej2_instances[0];

fileUploader.clearAll();

 


Sample:  Ibzdts (forked) - StackBlitz 


Regards,

Sivaranjith



KA Kabe September 21, 2023 02:24 PM UTC

I see. It's strange for me because your demo works but then you press the 'Edit in Stackblitz' button and it doesn't work.

I will keep in mind that the two are not identical.


Thanks!



PR Preethi Rajakandham Syncfusion Team September 22, 2023 07:03 AM UTC

Hi Kabe,

You're welcome. 

 Please let us know if you have any further queries on this. We are happy to help.

Regards,

Preethi R


Loader.
Up arrow icon