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. Image for the cookie policy date

Need clarification on when to use the upgrade function

Hi,

We are currently running a rather old release of your product - 15.2 - and hope to upgrading that shortly to your latest release.
We currently have the following code in place (I believe Syncfusion initially provided this to address an issue we were having at the time):

var version = Number(jsonData.version);
        if (isNaN(version)) {
            version = jsonData.version.split(".");
            //get the short form version 
            jsonDataVersion = version = Number(version[0] + "." + version[1]);
        }

        if (!NE_User) {
            if (jsonDataVersion < 15.2) {
                diagram.upgrade(jsonData);
            }
        }

My question is: do we need to continue doing this?
What exactly does the upgrade actually do?

Thanks for any assistance you can provide on this subject.

Jim


1 Reply

AR Aravind Ravi Syncfusion Team February 7, 2019 10:27 AM UTC

Hi Jim, 
 
The upgrade method is used to upgrade the JSON data saved from older version of diagram to later version. That is if we depreciated any API in newer version or any behavior changes, the upgrade method will convert the older version JSON data to newer version. 
 
This method no longer needed in your application side. While loading the diagram, we will upgrade the data to newer version and will load the diagram. 
 
Regards 
Aravind Ravi 
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon