We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom layout setup

Thread ID:

Created:

Updated:

Platform:

Replies:

149553 Nov 29,2019 02:21 PM UTC Dec 11,2019 09:41 AM UTC Vue 3
loading
Tags: Diagram
Alex B
Asked On November 29, 2019 02:21 PM UTC

I'm saving and loading diagram from json using diagram.saveDiagram() and load it diagram.loadDiagram()
When I put the node, click save, and then reload diagram, my nodes are alligned in Hierarchical layout, but I wan't to load nodes at that position they are dropped,
Refered to  this page Automatic Layout and didn't find tips, how to setup this.
Can you provide some example to save node's positions without aligning after diagram loaded from json?

Shyam G [Syncfusion]
Replied On December 2, 2019 12:20 PM UTC

Hi Alex, 
 
We don’t have option to retain the node position in layout while serializing the diagram. We will validate it further and update you with more details soon. 
 
Regards, 
Shyam G 


Shyam G [Syncfusion]
Replied On December 4, 2019 02:43 PM UTC

Hi Alex, 
 
We have logged “Nodes position is not retained in the layout while serializing the diagram” as a defect. The fix for this issue is estimated to be available on 11th December, 2019. 
 
You can track the status of the issue from the below feedback link.  
 
 
 
Regards, 
Shyam G 


Shyam G [Syncfusion]
Replied On December 11, 2019 09:41 AM UTC

Hi Alex,  
 
Reported Issue: Nodes position is not retained in the layout while serializing the diagram. 
   
We are glad to announce that our patch release (v17.3.34) is rolled out successfully and In that release, we have added the fix for reported issue.       
 
Please upgrade to the latest version packages to resolve this issue.       
 
We should set layout type as None before loading the diagram to resolve your issue. Please refer to a code example below. 
 
Code example: 
 let saveloaddata= diagram.saveDiagram();
        saveloaddata=  JSON.parse(saveloaddata);
        saveloaddata.layout.type = "None";
        saveloaddata= JSON.stringify(saveloaddata)
        diagram.loadDiagram(saveloaddata);
 
 
 
 
Regards,  
Shyam G  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon