mxClient.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. /**
  2. * Copyright (c) 2006-2017, JGraph Ltd
  3. * Copyright (c) 2006-2017, Gaudenz Alder
  4. */
  5. var mxClient =
  6. {
  7. /**
  8. * Class: mxClient
  9. *
  10. * Bootstrapping mechanism for the mxGraph thin client. The production version
  11. * of this file contains all code required to run the mxGraph thin client, as
  12. * well as global constants to identify the browser and operating system in
  13. * use. You may have to load chrome://global/content/contentAreaUtils.js in
  14. * your page to disable certain security restrictions in Mozilla.
  15. *
  16. * Variable: VERSION
  17. *
  18. * Contains the current version of the mxGraph library. The strings that
  19. * communicate versions of mxGraph use the following format.
  20. *
  21. * versionMajor.versionMinor.buildNumber.revisionNumber
  22. *
  23. * Current version is 4.2.2.
  24. */
  25. VERSION: '4.2.2',
  26. /**
  27. * Variable: IS_IE
  28. *
  29. * True if the current browser is Internet Explorer 10 or below. Use <mxClient.IS_IE11>
  30. * to detect IE 11.
  31. */
  32. IS_IE: navigator.userAgent != null && navigator.userAgent.indexOf('MSIE') >= 0,
  33. /**
  34. * Variable: IS_IE6
  35. *
  36. * True if the current browser is Internet Explorer 6.x.
  37. */
  38. IS_IE6: navigator.userAgent != null && navigator.userAgent.indexOf('MSIE 6') >= 0,
  39. /**
  40. * Variable: IS_IE11
  41. *
  42. * True if the current browser is Internet Explorer 11.x.
  43. */
  44. IS_IE11: navigator.userAgent != null && !!navigator.userAgent.match(/Trident\/7\./),
  45. /**
  46. * Variable: IS_EDGE
  47. *
  48. * True if the current browser is Microsoft Edge.
  49. */
  50. IS_EDGE: navigator.userAgent != null && !!navigator.userAgent.match(/Edge\//),
  51. /**
  52. * Variable: IS_QUIRKS
  53. *
  54. * True if the current browser is Internet Explorer and it is in quirks mode.
  55. */
  56. IS_QUIRKS: navigator.userAgent != null && navigator.userAgent.indexOf('MSIE') >= 0 &&
  57. (document.documentMode == null || document.documentMode == 5),
  58. /**
  59. * Variable: IS_EM
  60. *
  61. * True if the browser is IE11 in enterprise mode (IE8 standards mode).
  62. */
  63. IS_EM: 'spellcheck' in document.createElement('textarea') && document.documentMode == 8,
  64. /**
  65. * Variable: VML_PREFIX
  66. *
  67. * Prefix for VML namespace in node names. Default is 'v'.
  68. */
  69. VML_PREFIX: 'v',
  70. /**
  71. * Variable: OFFICE_PREFIX
  72. *
  73. * Prefix for VML office namespace in node names. Default is 'o'.
  74. */
  75. OFFICE_PREFIX: 'o',
  76. /**
  77. * Variable: IS_NS
  78. *
  79. * True if the current browser is Netscape (including Firefox).
  80. */
  81. IS_NS: navigator.userAgent != null &&
  82. navigator.userAgent.indexOf('Mozilla/') >= 0 &&
  83. navigator.userAgent.indexOf('MSIE') < 0 &&
  84. navigator.userAgent.indexOf('Edge/') < 0,
  85. /**
  86. * Variable: IS_OP
  87. *
  88. * True if the current browser is Opera.
  89. */
  90. IS_OP: navigator.userAgent != null &&
  91. (navigator.userAgent.indexOf('Opera/') >= 0 ||
  92. navigator.userAgent.indexOf('OPR/') >= 0),
  93. /**
  94. * Variable: IS_OT
  95. *
  96. * True if -o-transform is available as a CSS style, ie for Opera browsers
  97. * based on a Presto engine with version 2.5 or later.
  98. */
  99. IS_OT: navigator.userAgent != null &&
  100. navigator.userAgent.indexOf('Presto/') >= 0 &&
  101. navigator.userAgent.indexOf('Presto/2.4.') < 0 &&
  102. navigator.userAgent.indexOf('Presto/2.3.') < 0 &&
  103. navigator.userAgent.indexOf('Presto/2.2.') < 0 &&
  104. navigator.userAgent.indexOf('Presto/2.1.') < 0 &&
  105. navigator.userAgent.indexOf('Presto/2.0.') < 0 &&
  106. navigator.userAgent.indexOf('Presto/1.') < 0,
  107. /**
  108. * Variable: IS_SF
  109. *
  110. * True if the current browser is Safari.
  111. */
  112. IS_SF: /Apple Computer, Inc/.test(navigator.vendor),
  113. /**
  114. * Variable: IS_ANDROID
  115. *
  116. * Returns true if the user agent contains Android.
  117. */
  118. IS_ANDROID: navigator.appVersion.indexOf('Android') >= 0,
  119. /**
  120. * Variable: IS_IOS
  121. *
  122. * Returns true if the user agent is an iPad, iPhone or iPod.
  123. */
  124. IS_IOS: (/iP(hone|od|ad)/.test(navigator.platform)),
  125. /**
  126. * Variable: IS_GC
  127. *
  128. * True if the current browser is Google Chrome.
  129. */
  130. IS_GC: /Google Inc/.test(navigator.vendor),
  131. /**
  132. * Variable: IS_CHROMEAPP
  133. *
  134. * True if the this is running inside a Chrome App.
  135. */
  136. IS_CHROMEAPP: window.chrome != null && chrome.app != null && chrome.app.runtime != null,
  137. /**
  138. * Variable: IS_FF
  139. *
  140. * True if the current browser is Firefox.
  141. */
  142. IS_FF: typeof InstallTrigger !== 'undefined',
  143. /**
  144. * Variable: IS_MT
  145. *
  146. * True if -moz-transform is available as a CSS style. This is the case
  147. * for all Firefox-based browsers newer than or equal 3, such as Camino,
  148. * Iceweasel, Seamonkey and Iceape.
  149. */
  150. IS_MT: (navigator.userAgent.indexOf('Firefox/') >= 0 &&
  151. navigator.userAgent.indexOf('Firefox/1.') < 0 &&
  152. navigator.userAgent.indexOf('Firefox/2.') < 0) ||
  153. (navigator.userAgent.indexOf('Iceweasel/') >= 0 &&
  154. navigator.userAgent.indexOf('Iceweasel/1.') < 0 &&
  155. navigator.userAgent.indexOf('Iceweasel/2.') < 0) ||
  156. (navigator.userAgent.indexOf('SeaMonkey/') >= 0 &&
  157. navigator.userAgent.indexOf('SeaMonkey/1.') < 0) ||
  158. (navigator.userAgent.indexOf('Iceape/') >= 0 &&
  159. navigator.userAgent.indexOf('Iceape/1.') < 0),
  160. /**
  161. * Variable: IS_VML
  162. *
  163. * True if the browser supports VML.
  164. */
  165. IS_VML: navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER',
  166. /**
  167. * Variable: IS_SVG
  168. *
  169. * True if the browser supports SVG.
  170. */
  171. IS_SVG: navigator.appName.toUpperCase() != 'MICROSOFT INTERNET EXPLORER',
  172. /**
  173. * Variable: NO_FO
  174. *
  175. * True if foreignObject support is not available. This is the case for
  176. * Opera, older SVG-based browsers and all versions of IE.
  177. */
  178. NO_FO: !document.createElementNS || document.createElementNS('http://www.w3.org/2000/svg',
  179. 'foreignObject') != '[object SVGForeignObjectElement]' || navigator.userAgent.indexOf('Opera/') >= 0,
  180. /**
  181. * Variable: IS_WIN
  182. *
  183. * True if the client is a Windows.
  184. */
  185. IS_WIN: navigator.appVersion.indexOf('Win') > 0,
  186. /**
  187. * Variable: IS_MAC
  188. *
  189. * True if the client is a Mac.
  190. */
  191. IS_MAC: navigator.appVersion.indexOf('Mac') > 0,
  192. /**
  193. * Variable: IS_CHROMEOS
  194. *
  195. * True if the client is a Chrome OS.
  196. */
  197. IS_CHROMEOS: /\bCrOS\b/.test(navigator.appVersion),
  198. /**
  199. * Variable: IS_TOUCH
  200. *
  201. * True if this device supports touchstart/-move/-end events (Apple iOS,
  202. * Android, Chromebook and Chrome Browser on touch-enabled devices).
  203. */
  204. IS_TOUCH: 'ontouchstart' in document.documentElement,
  205. /**
  206. * Variable: IS_POINTER
  207. *
  208. * True if this device supports Microsoft pointer events (always false on Macs).
  209. */
  210. IS_POINTER: window.PointerEvent != null && !(navigator.appVersion.indexOf('Mac') > 0),
  211. /**
  212. * Variable: IS_LOCAL
  213. *
  214. * True if the documents location does not start with http:// or https://.
  215. */
  216. IS_LOCAL: document.location.href.indexOf('http://') < 0 &&
  217. document.location.href.indexOf('https://') < 0,
  218. /**
  219. * Variable: defaultBundles
  220. *
  221. * Contains the base names of the default bundles if mxLoadResources is false.
  222. */
  223. defaultBundles: [],
  224. /**
  225. * Function: isBrowserSupported
  226. *
  227. * Returns true if the current browser is supported, that is, if
  228. * <mxClient.IS_VML> or <mxClient.IS_SVG> is true.
  229. *
  230. * Example:
  231. *
  232. * (code)
  233. * if (!mxClient.isBrowserSupported())
  234. * {
  235. * mxUtils.error('Browser is not supported!', 200, false);
  236. * }
  237. * (end)
  238. */
  239. isBrowserSupported: function()
  240. {
  241. return mxClient.IS_VML || mxClient.IS_SVG;
  242. },
  243. /**
  244. * Function: link
  245. *
  246. * Adds a link node to the head of the document. Use this
  247. * to add a stylesheet to the page as follows:
  248. *
  249. * (code)
  250. * mxClient.link('stylesheet', filename);
  251. * (end)
  252. *
  253. * where filename is the (relative) URL of the stylesheet. The charset
  254. * is hardcoded to ISO-8859-1 and the type is text/css.
  255. *
  256. * Parameters:
  257. *
  258. * rel - String that represents the rel attribute of the link node.
  259. * href - String that represents the href attribute of the link node.
  260. * doc - Optional parent document of the link node.
  261. * id - unique id for the link element to check if it already exists
  262. */
  263. link: function(rel, href, doc, id)
  264. {
  265. doc = doc || document;
  266. // Workaround for Operation Aborted in IE6 if base tag is used in head
  267. if (mxClient.IS_IE6)
  268. {
  269. doc.write('<link rel="' + rel + '" href="' + href + '" charset="UTF-8" type="text/css"/>');
  270. }
  271. else
  272. {
  273. var link = doc.createElement('link');
  274. link.setAttribute('rel', rel);
  275. link.setAttribute('href', href);
  276. link.setAttribute('charset', 'UTF-8');
  277. link.setAttribute('type', 'text/css');
  278. if (id)
  279. {
  280. link.setAttribute('id', id);
  281. }
  282. var head = doc.getElementsByTagName('head')[0];
  283. head.appendChild(link);
  284. }
  285. },
  286. /**
  287. * Function: loadResources
  288. *
  289. * Helper method to load the default bundles if mxLoadResources is false.
  290. *
  291. * Parameters:
  292. *
  293. * fn - Function to call after all resources have been loaded.
  294. * lan - Optional string to pass to <mxResources.add>.
  295. */
  296. loadResources: function(fn, lan)
  297. {
  298. var pending = mxClient.defaultBundles.length;
  299. function callback()
  300. {
  301. if (--pending == 0)
  302. {
  303. fn();
  304. }
  305. }
  306. for (var i = 0; i < mxClient.defaultBundles.length; i++)
  307. {
  308. mxResources.add(mxClient.defaultBundles[i], lan, callback);
  309. }
  310. },
  311. /**
  312. * Function: include
  313. *
  314. * Dynamically adds a script node to the document header.
  315. *
  316. * In production environments, the includes are resolved in the mxClient.js
  317. * file to reduce the number of requests required for client startup. This
  318. * function should only be used in development environments, but not in
  319. * production systems.
  320. */
  321. include: function(src)
  322. {
  323. document.write('<script src="'+src+'"></script>');
  324. }
  325. };
  326. /**
  327. * Variable: mxLoadResources
  328. *
  329. * Optional global config variable to toggle loading of the two resource files
  330. * in <mxGraph> and <mxEditor>. Default is true. NOTE: This is a global variable,
  331. * not a variable of mxClient. If this is false, you can use <mxClient.loadResources>
  332. * with its callback to load the default bundles asynchronously.
  333. *
  334. * (code)
  335. * <script type="text/javascript">
  336. * var mxLoadResources = false;
  337. * </script>
  338. * <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
  339. * (end)
  340. */
  341. if (typeof(mxLoadResources) == 'undefined')
  342. {
  343. mxLoadResources = true;
  344. }
  345. /**
  346. * Variable: mxForceIncludes
  347. *
  348. * Optional global config variable to force loading the JavaScript files in
  349. * development mode. Default is undefined. NOTE: This is a global variable,
  350. * not a variable of mxClient.
  351. *
  352. * (code)
  353. * <script type="text/javascript">
  354. * var mxLoadResources = true;
  355. * </script>
  356. * <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
  357. * (end)
  358. */
  359. if (typeof(mxForceIncludes) == 'undefined')
  360. {
  361. mxForceIncludes = false;
  362. }
  363. /**
  364. * Variable: mxResourceExtension
  365. *
  366. * Optional global config variable to specify the extension of resource files.
  367. * Default is true. NOTE: This is a global variable, not a variable of mxClient.
  368. *
  369. * (code)
  370. * <script type="text/javascript">
  371. * var mxResourceExtension = '.txt';
  372. * </script>
  373. * <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
  374. * (end)
  375. */
  376. if (typeof(mxResourceExtension) == 'undefined')
  377. {
  378. mxResourceExtension = '.txt';
  379. }
  380. /**
  381. * Variable: mxLoadStylesheets
  382. *
  383. * Optional global config variable to toggle loading of the CSS files when
  384. * the library is initialized. Default is true. NOTE: This is a global variable,
  385. * not a variable of mxClient.
  386. *
  387. * (code)
  388. * <script type="text/javascript">
  389. * var mxLoadStylesheets = false;
  390. * </script>
  391. * <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
  392. * (end)
  393. */
  394. if (typeof(mxLoadStylesheets) == 'undefined')
  395. {
  396. mxLoadStylesheets = true;
  397. }
  398. /**
  399. * Variable: basePath
  400. *
  401. * Basepath for all URLs in the core without trailing slash. Default is '.'.
  402. * Set mxBasePath prior to loading the mxClient library as follows to override
  403. * this setting:
  404. *
  405. * (code)
  406. * <script type="text/javascript">
  407. * mxBasePath = '/path/to/core/directory';
  408. * </script>
  409. * <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
  410. * (end)
  411. *
  412. * When using a relative path, the path is relative to the URL of the page that
  413. * contains the assignment. Trailing slashes are automatically removed.
  414. */
  415. if (typeof(mxBasePath) != 'undefined' && mxBasePath.length > 0)
  416. {
  417. // Adds a trailing slash if required
  418. if (mxBasePath.substring(mxBasePath.length - 1) == '/')
  419. {
  420. mxBasePath = mxBasePath.substring(0, mxBasePath.length - 1);
  421. }
  422. mxClient.basePath = mxBasePath;
  423. }
  424. else
  425. {
  426. mxClient.basePath = '.';
  427. }
  428. /**
  429. * Variable: imageBasePath
  430. *
  431. * Basepath for all images URLs in the core without trailing slash. Default is
  432. * <mxClient.basePath> + '/images'. Set mxImageBasePath prior to loading the
  433. * mxClient library as follows to override this setting:
  434. *
  435. * (code)
  436. * <script type="text/javascript">
  437. * mxImageBasePath = '/path/to/image/directory';
  438. * </script>
  439. * <script type="text/javascript" src="/path/to/core/directory/js/mxClient.js"></script>
  440. * (end)
  441. *
  442. * When using a relative path, the path is relative to the URL of the page that
  443. * contains the assignment. Trailing slashes are automatically removed.
  444. */
  445. if (typeof(mxImageBasePath) != 'undefined' && mxImageBasePath.length > 0)
  446. {
  447. // Adds a trailing slash if required
  448. if (mxImageBasePath.substring(mxImageBasePath.length - 1) == '/')
  449. {
  450. mxImageBasePath = mxImageBasePath.substring(0, mxImageBasePath.length - 1);
  451. }
  452. mxClient.imageBasePath = mxImageBasePath;
  453. }
  454. else
  455. {
  456. mxClient.imageBasePath = mxClient.basePath + '/images';
  457. }
  458. /**
  459. * Variable: language
  460. *
  461. * Defines the language of the client, eg. en for english, de for german etc.
  462. * The special value 'none' will disable all built-in internationalization and
  463. * resource loading. See <mxResources.getSpecialBundle> for handling identifiers
  464. * with and without a dash.
  465. *
  466. * Set mxLanguage prior to loading the mxClient library as follows to override
  467. * this setting:
  468. *
  469. * (code)
  470. * <script type="text/javascript">
  471. * mxLanguage = 'en';
  472. * </script>
  473. * <script type="text/javascript" src="js/mxClient.js"></script>
  474. * (end)
  475. *
  476. * If internationalization is disabled, then the following variables should be
  477. * overridden to reflect the current language of the system. These variables are
  478. * cleared when i18n is disabled.
  479. * <mxEditor.askZoomResource>, <mxEditor.lastSavedResource>,
  480. * <mxEditor.currentFileResource>, <mxEditor.propertiesResource>,
  481. * <mxEditor.tasksResource>, <mxEditor.helpResource>, <mxEditor.outlineResource>,
  482. * <mxElbowEdgeHandler.doubleClickOrientationResource>, <mxUtils.errorResource>,
  483. * <mxUtils.closeResource>, <mxGraphSelectionModel.doneResource>,
  484. * <mxGraphSelectionModel.updatingSelectionResource>, <mxGraphView.doneResource>,
  485. * <mxGraphView.updatingDocumentResource>, <mxCellRenderer.collapseExpandResource>,
  486. * <mxGraph.containsValidationErrorsResource> and
  487. * <mxGraph.alreadyConnectedResource>.
  488. */
  489. if (typeof(mxLanguage) != 'undefined' && mxLanguage != null)
  490. {
  491. mxClient.language = mxLanguage;
  492. }
  493. else
  494. {
  495. mxClient.language = (mxClient.IS_IE) ? navigator.userLanguage : navigator.language;
  496. }
  497. /**
  498. * Variable: defaultLanguage
  499. *
  500. * Defines the default language which is used in the common resource files. Any
  501. * resources for this language will only load the common resource file, but not
  502. * the language-specific resource file. Default is 'en'.
  503. *
  504. * Set mxDefaultLanguage prior to loading the mxClient library as follows to override
  505. * this setting:
  506. *
  507. * (code)
  508. * <script type="text/javascript">
  509. * mxDefaultLanguage = 'de';
  510. * </script>
  511. * <script type="text/javascript" src="js/mxClient.js"></script>
  512. * (end)
  513. */
  514. if (typeof(mxDefaultLanguage) != 'undefined' && mxDefaultLanguage != null)
  515. {
  516. mxClient.defaultLanguage = mxDefaultLanguage;
  517. }
  518. else
  519. {
  520. mxClient.defaultLanguage = 'en';
  521. }
  522. // Adds all required stylesheets and namespaces
  523. if (mxLoadStylesheets)
  524. {
  525. mxClient.link('stylesheet', mxClient.basePath + '/css/common.css');
  526. }
  527. /**
  528. * Variable: languages
  529. *
  530. * Defines the optional array of all supported language extensions. The default
  531. * language does not have to be part of this list. See
  532. * <mxResources.isLanguageSupported>.
  533. *
  534. * (code)
  535. * <script type="text/javascript">
  536. * mxLanguages = ['de', 'it', 'fr'];
  537. * </script>
  538. * <script type="text/javascript" src="js/mxClient.js"></script>
  539. * (end)
  540. *
  541. * This is used to avoid unnecessary requests to language files, ie. if a 404
  542. * will be returned.
  543. */
  544. if (typeof(mxLanguages) != 'undefined' && mxLanguages != null)
  545. {
  546. mxClient.languages = mxLanguages;
  547. }
  548. // Adds required namespaces, stylesheets and memory handling for older IE browsers
  549. if (mxClient.IS_VML)
  550. {
  551. if (mxClient.IS_SVG)
  552. {
  553. mxClient.IS_VML = false;
  554. }
  555. else
  556. {
  557. // Enables support for IE8 standards mode. Note that this requires all attributes for VML
  558. // elements to be set using direct notation, ie. node.attr = value, not setAttribute.
  559. if (document.namespaces != null)
  560. {
  561. if (document.documentMode == 8)
  562. {
  563. document.namespaces.add(mxClient.VML_PREFIX, 'urn:schemas-microsoft-com:vml', '#default#VML');
  564. document.namespaces.add(mxClient.OFFICE_PREFIX, 'urn:schemas-microsoft-com:office:office', '#default#VML');
  565. }
  566. else
  567. {
  568. document.namespaces.add(mxClient.VML_PREFIX, 'urn:schemas-microsoft-com:vml');
  569. document.namespaces.add(mxClient.OFFICE_PREFIX, 'urn:schemas-microsoft-com:office:office');
  570. }
  571. }
  572. // Workaround for limited number of stylesheets in IE (does not work in standards mode)
  573. if (mxClient.IS_QUIRKS && document.styleSheets.length >= 30)
  574. {
  575. (function()
  576. {
  577. var node = document.createElement('style');
  578. node.type = 'text/css';
  579. node.styleSheet.cssText = mxClient.VML_PREFIX + '\\:*{behavior:url(#default#VML)}' +
  580. mxClient.OFFICE_PREFIX + '\\:*{behavior:url(#default#VML)}';
  581. document.getElementsByTagName('head')[0].appendChild(node);
  582. })();
  583. }
  584. else
  585. {
  586. document.createStyleSheet().cssText = mxClient.VML_PREFIX + '\\:*{behavior:url(#default#VML)}' +
  587. mxClient.OFFICE_PREFIX + '\\:*{behavior:url(#default#VML)}';
  588. }
  589. if (mxLoadStylesheets)
  590. {
  591. mxClient.link('stylesheet', mxClient.basePath + '/css/explorer.css');
  592. }
  593. }
  594. }
  595. // PREPROCESSOR-REMOVE-START
  596. // If script is loaded via CommonJS, do not write <script> tags to the page
  597. // for dependencies. These are already included in the build.
  598. if (mxForceIncludes || !(typeof module === 'object' && module.exports != null))
  599. {
  600. // PREPROCESSOR-REMOVE-END
  601. mxClient.include(mxClient.basePath+'/js/util/mxLog.js');
  602. mxClient.include(mxClient.basePath+'/js/util/mxObjectIdentity.js');
  603. mxClient.include(mxClient.basePath+'/js/util/mxDictionary.js');
  604. mxClient.include(mxClient.basePath+'/js/util/mxResources.js');
  605. mxClient.include(mxClient.basePath+'/js/util/mxPoint.js');
  606. mxClient.include(mxClient.basePath+'/js/util/mxRectangle.js');
  607. mxClient.include(mxClient.basePath+'/js/util/mxEffects.js');
  608. mxClient.include(mxClient.basePath+'/js/util/mxUtils.js');
  609. mxClient.include(mxClient.basePath+'/js/util/mxConstants.js');
  610. mxClient.include(mxClient.basePath+'/js/util/mxEventObject.js');
  611. mxClient.include(mxClient.basePath+'/js/util/mxMouseEvent.js');
  612. mxClient.include(mxClient.basePath+'/js/util/mxEventSource.js');
  613. mxClient.include(mxClient.basePath+'/js/util/mxEvent.js');
  614. mxClient.include(mxClient.basePath+'/js/util/mxXmlRequest.js');
  615. mxClient.include(mxClient.basePath+'/js/util/mxClipboard.js');
  616. mxClient.include(mxClient.basePath+'/js/util/mxWindow.js');
  617. mxClient.include(mxClient.basePath+'/js/util/mxForm.js');
  618. mxClient.include(mxClient.basePath+'/js/util/mxImage.js');
  619. mxClient.include(mxClient.basePath+'/js/util/mxDivResizer.js');
  620. mxClient.include(mxClient.basePath+'/js/util/mxDragSource.js');
  621. mxClient.include(mxClient.basePath+'/js/util/mxToolbar.js');
  622. mxClient.include(mxClient.basePath+'/js/util/mxUndoableEdit.js');
  623. mxClient.include(mxClient.basePath+'/js/util/mxUndoManager.js');
  624. mxClient.include(mxClient.basePath+'/js/util/mxUrlConverter.js');
  625. mxClient.include(mxClient.basePath+'/js/util/mxPanningManager.js');
  626. mxClient.include(mxClient.basePath+'/js/util/mxPopupMenu.js');
  627. mxClient.include(mxClient.basePath+'/js/util/mxAutoSaveManager.js');
  628. mxClient.include(mxClient.basePath+'/js/util/mxAnimation.js');
  629. mxClient.include(mxClient.basePath+'/js/util/mxMorphing.js');
  630. mxClient.include(mxClient.basePath+'/js/util/mxImageBundle.js');
  631. mxClient.include(mxClient.basePath+'/js/util/mxImageExport.js');
  632. mxClient.include(mxClient.basePath+'/js/util/mxAbstractCanvas2D.js');
  633. mxClient.include(mxClient.basePath+'/js/util/mxXmlCanvas2D.js');
  634. mxClient.include(mxClient.basePath+'/js/util/mxSvgCanvas2D.js');
  635. mxClient.include(mxClient.basePath+'/js/util/mxVmlCanvas2D.js');
  636. mxClient.include(mxClient.basePath+'/js/util/mxGuide.js');
  637. mxClient.include(mxClient.basePath+'/js/shape/mxShape.js');
  638. mxClient.include(mxClient.basePath+'/js/shape/mxStencil.js');
  639. mxClient.include(mxClient.basePath+'/js/shape/mxStencilRegistry.js');
  640. mxClient.include(mxClient.basePath+'/js/shape/mxMarker.js');
  641. mxClient.include(mxClient.basePath+'/js/shape/mxActor.js');
  642. mxClient.include(mxClient.basePath+'/js/shape/mxCloud.js');
  643. mxClient.include(mxClient.basePath+'/js/shape/mxRectangleShape.js');
  644. mxClient.include(mxClient.basePath+'/js/shape/mxEllipse.js');
  645. mxClient.include(mxClient.basePath+'/js/shape/mxDoubleEllipse.js');
  646. mxClient.include(mxClient.basePath+'/js/shape/mxRhombus.js');
  647. mxClient.include(mxClient.basePath+'/js/shape/mxPolyline.js');
  648. mxClient.include(mxClient.basePath+'/js/shape/mxArrow.js');
  649. mxClient.include(mxClient.basePath+'/js/shape/mxArrowConnector.js');
  650. mxClient.include(mxClient.basePath+'/js/shape/mxText.js');
  651. mxClient.include(mxClient.basePath+'/js/shape/mxTriangle.js');
  652. mxClient.include(mxClient.basePath+'/js/shape/mxHexagon.js');
  653. mxClient.include(mxClient.basePath+'/js/shape/mxLine.js');
  654. mxClient.include(mxClient.basePath+'/js/shape/mxImageShape.js');
  655. mxClient.include(mxClient.basePath+'/js/shape/mxLabel.js');
  656. mxClient.include(mxClient.basePath+'/js/shape/mxCylinder.js');
  657. mxClient.include(mxClient.basePath+'/js/shape/mxConnector.js');
  658. mxClient.include(mxClient.basePath+'/js/shape/mxSwimlane.js');
  659. mxClient.include(mxClient.basePath+'/js/layout/mxGraphLayout.js');
  660. mxClient.include(mxClient.basePath+'/js/layout/mxStackLayout.js');
  661. mxClient.include(mxClient.basePath+'/js/layout/mxPartitionLayout.js');
  662. mxClient.include(mxClient.basePath+'/js/layout/mxCompactTreeLayout.js');
  663. mxClient.include(mxClient.basePath+'/js/layout/mxRadialTreeLayout.js');
  664. mxClient.include(mxClient.basePath+'/js/layout/mxFastOrganicLayout.js');
  665. mxClient.include(mxClient.basePath+'/js/layout/mxCircleLayout.js');
  666. mxClient.include(mxClient.basePath+'/js/layout/mxParallelEdgeLayout.js');
  667. mxClient.include(mxClient.basePath+'/js/layout/mxCompositeLayout.js');
  668. mxClient.include(mxClient.basePath+'/js/layout/mxEdgeLabelLayout.js');
  669. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphAbstractHierarchyCell.js');
  670. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphHierarchyNode.js');
  671. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphHierarchyEdge.js');
  672. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxGraphHierarchyModel.js');
  673. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/model/mxSwimlaneModel.js');
  674. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxHierarchicalLayoutStage.js');
  675. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxMedianHybridCrossingReduction.js');
  676. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxMinimumCycleRemover.js');
  677. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxCoordinateAssignment.js');
  678. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/stage/mxSwimlaneOrdering.js');
  679. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/mxHierarchicalLayout.js');
  680. mxClient.include(mxClient.basePath+'/js/layout/hierarchical/mxSwimlaneLayout.js');
  681. mxClient.include(mxClient.basePath+'/js/model/mxGraphModel.js');
  682. mxClient.include(mxClient.basePath+'/js/model/mxCell.js');
  683. mxClient.include(mxClient.basePath+'/js/model/mxGeometry.js');
  684. mxClient.include(mxClient.basePath+'/js/model/mxCellPath.js');
  685. mxClient.include(mxClient.basePath+'/js/view/mxPerimeter.js');
  686. mxClient.include(mxClient.basePath+'/js/view/mxPrintPreview.js');
  687. mxClient.include(mxClient.basePath+'/js/view/mxStylesheet.js');
  688. mxClient.include(mxClient.basePath+'/js/view/mxCellState.js');
  689. mxClient.include(mxClient.basePath+'/js/view/mxGraphSelectionModel.js');
  690. mxClient.include(mxClient.basePath+'/js/view/mxCellEditor.js');
  691. mxClient.include(mxClient.basePath+'/js/view/mxCellRenderer.js');
  692. mxClient.include(mxClient.basePath+'/js/view/mxEdgeStyle.js');
  693. mxClient.include(mxClient.basePath+'/js/view/mxStyleRegistry.js');
  694. mxClient.include(mxClient.basePath+'/js/view/mxGraphView.js');
  695. mxClient.include(mxClient.basePath+'/js/view/mxGraph.js');
  696. mxClient.include(mxClient.basePath+'/js/view/mxCellOverlay.js');
  697. mxClient.include(mxClient.basePath+'/js/view/mxOutline.js');
  698. mxClient.include(mxClient.basePath+'/js/view/mxMultiplicity.js');
  699. mxClient.include(mxClient.basePath+'/js/view/mxLayoutManager.js');
  700. mxClient.include(mxClient.basePath+'/js/view/mxSwimlaneManager.js');
  701. mxClient.include(mxClient.basePath+'/js/view/mxTemporaryCellStates.js');
  702. mxClient.include(mxClient.basePath+'/js/view/mxCellStatePreview.js');
  703. mxClient.include(mxClient.basePath+'/js/view/mxConnectionConstraint.js');
  704. mxClient.include(mxClient.basePath+'/js/handler/mxGraphHandler.js');
  705. mxClient.include(mxClient.basePath+'/js/handler/mxPanningHandler.js');
  706. mxClient.include(mxClient.basePath+'/js/handler/mxPopupMenuHandler.js');
  707. mxClient.include(mxClient.basePath+'/js/handler/mxCellMarker.js');
  708. mxClient.include(mxClient.basePath+'/js/handler/mxSelectionCellsHandler.js');
  709. mxClient.include(mxClient.basePath+'/js/handler/mxConnectionHandler.js');
  710. mxClient.include(mxClient.basePath+'/js/handler/mxConstraintHandler.js');
  711. mxClient.include(mxClient.basePath+'/js/handler/mxRubberband.js');
  712. mxClient.include(mxClient.basePath+'/js/handler/mxHandle.js');
  713. mxClient.include(mxClient.basePath+'/js/handler/mxVertexHandler.js');
  714. mxClient.include(mxClient.basePath+'/js/handler/mxEdgeHandler.js');
  715. mxClient.include(mxClient.basePath+'/js/handler/mxElbowEdgeHandler.js');
  716. mxClient.include(mxClient.basePath+'/js/handler/mxEdgeSegmentHandler.js');
  717. mxClient.include(mxClient.basePath+'/js/handler/mxKeyHandler.js');
  718. mxClient.include(mxClient.basePath+'/js/handler/mxTooltipHandler.js');
  719. mxClient.include(mxClient.basePath+'/js/handler/mxCellTracker.js');
  720. mxClient.include(mxClient.basePath+'/js/handler/mxCellHighlight.js');
  721. mxClient.include(mxClient.basePath+'/js/editor/mxDefaultKeyHandler.js');
  722. mxClient.include(mxClient.basePath+'/js/editor/mxDefaultPopupMenu.js');
  723. mxClient.include(mxClient.basePath+'/js/editor/mxDefaultToolbar.js');
  724. mxClient.include(mxClient.basePath+'/js/editor/mxEditor.js');
  725. mxClient.include(mxClient.basePath+'/js/io/mxCodecRegistry.js');
  726. mxClient.include(mxClient.basePath+'/js/io/mxCodec.js');
  727. mxClient.include(mxClient.basePath+'/js/io/mxObjectCodec.js');
  728. mxClient.include(mxClient.basePath+'/js/io/mxCellCodec.js');
  729. mxClient.include(mxClient.basePath+'/js/io/mxModelCodec.js');
  730. mxClient.include(mxClient.basePath+'/js/io/mxRootChangeCodec.js');
  731. mxClient.include(mxClient.basePath+'/js/io/mxChildChangeCodec.js');
  732. mxClient.include(mxClient.basePath+'/js/io/mxTerminalChangeCodec.js');
  733. mxClient.include(mxClient.basePath+'/js/io/mxGenericChangeCodec.js');
  734. mxClient.include(mxClient.basePath+'/js/io/mxGraphCodec.js');
  735. mxClient.include(mxClient.basePath+'/js/io/mxGraphViewCodec.js');
  736. mxClient.include(mxClient.basePath+'/js/io/mxStylesheetCodec.js');
  737. mxClient.include(mxClient.basePath+'/js/io/mxDefaultKeyHandlerCodec.js');
  738. mxClient.include(mxClient.basePath+'/js/io/mxDefaultToolbarCodec.js');
  739. mxClient.include(mxClient.basePath+'/js/io/mxDefaultPopupMenuCodec.js');
  740. mxClient.include(mxClient.basePath+'/js/io/mxEditorCodec.js');
  741. // PREPROCESSOR-REMOVE-START
  742. }
  743. // PREPROCESSOR-REMOVE-END