Init.js 1.4 KB

1234567891011121314151617181920212223242526272829
  1. // urlParams is null when used for embedding
  2. window.urlParams = window.urlParams || {};
  3. // Public global variables
  4. window.MAX_REQUEST_SIZE = window.MAX_REQUEST_SIZE || 10485760;
  5. window.MAX_AREA = window.MAX_AREA || 15000 * 15000;
  6. // URLs for save and export
  7. window.EXPORT_URL = window.EXPORT_URL || '/export';
  8. window.SAVE_URL = window.SAVE_URL || '/save';
  9. window.OPEN_URL = window.OPEN_URL || '/open';
  10. window.RESOURCES_PATH = window.RESOURCES_PATH || 'resources';
  11. window.RESOURCE_BASE = window.RESOURCE_BASE || window.RESOURCES_PATH + '/grapheditor';
  12. window.STENCIL_PATH = window.STENCIL_PATH || 'stencils';
  13. window.IMAGE_PATH = window.IMAGE_PATH || 'images';
  14. window.STYLE_PATH = window.STYLE_PATH || 'styles';
  15. window.CSS_PATH = window.CSS_PATH || 'styles';
  16. window.OPEN_FORM = window.OPEN_FORM || 'open.html';
  17. // Sets the base path, the UI language via URL param and configures the
  18. // supported languages to avoid 404s. The loading of all core language
  19. // resources is disabled as all required resources are in grapheditor.
  20. // properties. Note that in this example the loading of two resource
  21. // files (the special bundle and the default bundle) is disabled to
  22. // save a GET request. This requires that all resources be present in
  23. // each properties file since only one file is loaded.
  24. window.mxBasePath = window.mxBasePath || '../mxgraph';
  25. window.mxLanguage = 'zh';
  26. window.mxLanguages = ['zh'];