Upgrade Notes

Upgrade Notes

Upgrading from V7.3 and Earlier

Migration steps:

  1. Remove link to esd.css. It has been incorporated into the DiagramEditor.js bundle.
  2. Change the script tag that references dojo.js to reference DiagramEditor.js.
  3. Remove the data-dojo-config attribute and add a data-diagram-editor-global attribute. This attribute defines the global editor reference which will be used to create a new editor instance.
  4. Replace the require code block with the window load event and create a new editor instance using the reference referred to in the step above. (See below for an example)

Including and Starting the Editor in V7.3 and Earlier:

<head>
  <link rel="stylesheet" href="http://www.example.com/css/esd.css">
 
  <script
    data-dojo-config="async: 1, tlmSiblingOfDojo: 0, baseUrl: 'http://www.example.com/static'"
    src="http://wwww.example.com/static/dojo/dojo.js">
  </script>
 
  <!-- Load the editor and place it in the DOM. -->
  <script type="text/javascript">
    require(['teton/ESDWeb'], function (ESDWeb) {
 
      // Startup the editor after the page is loaded.
      $(document).ready(function () {
        // Create the editor and place it in the DOM node with id = "editor-node".
        editor = new ESDWeb(null, 'editor-node');
 
        // Startup the editor, defining the web service URL, user id, and license id.
        editor.startup({});
    });
  </script>
</head>

Including and Starting the Editor in this Release:

<head>
  <!-- 1. Reference to esd.css removed. -->
 
  <!-- 2. Point to DiagramEditor.js instead of dojo.js -->
  <!-- 3. Add data-diagram-editor-global attribute -->
  <script src="http://www.example.com/static/DiagramEditor.js"
    data-diagram-editor-global="__editor">
  </script>
 
  <!-- 4. Load the editor and place it in the DOM. -->
  <script type="text/javascript">
    // Startup the editor after the page is loaded.
    $(window).on('load', function () {
        // Create the editor and place it in the DOM node with id = "editor-node".
        editor = new window.__editor(undefined, document.getElementById('editor-node'));
 
        // Startup the editor, defining the web service URL, user id, and license id.
        editor.startup({
            serviceUrl: 'http://www.example.com/REST',
            licenseId: '12345678', // Replace with your license ID.
            userId: 'user-id' // Use a distinct id for every user in your system.
        });
    }
  </script>
</head>