Returns true if the user agent contains Android.
True if the this is running inside a Chrome App.
True if the client is a Chrome OS.
True if the current browser is Microsoft Edge.
True if the current browser is Firefox.
True if the current browser is Google Chrome.
Returns true if the user agent is an iPad, iPhone or iPod.
True if the documents location does not start with http:// or https://.
True if the client is a Mac.
True if -moz-transform is available as a CSS style. This is the case for all Firefox-based browsers newer than or equal 3, such as Camino, Iceweasel, Seamonkey and Iceape.
True if the current browser is Netscape (including Firefox).
True if this device supports Microsoft pointer events (always false on Macs).
True if the current browser is Safari.
True if the browser supports SVG.
True if this device supports touchstart/-move/-end events (Apple iOS, Android, Chromebook and Chrome Browser on touch-enabled devices).
True if the client is a Windows.
True if foreignObject support is not available. This is the case for Opera, older SVG-based browsers and all versions of IE.
Class: Client
Bootstrapping mechanism for the mxGraph thin client. The production version of this file contains all code required to run the mxGraph thin client, as well as global constants to identify the browser and operating system in use. You may have to load chrome://global/content/contentAreaUtils.js in your page to disable certain security restrictions in Mozilla.
Contains the current version of the mxGraph library. The strings that communicate versions of mxGraph use the following format.
versionMajor.versionMinor.buildNumber.revisionNumber
Current version is 4.2.2.
Basepath for all URLs in the core without trailing slash. Default is '.'. Set mxBasePath prior to loading the Client library as follows to override this setting:
<script type="text/javascript">
mxBasePath = '/path/to/core/directory';
</script>
<script type="text/javascript" src="/path/to/core/directory/js/Client.js"></script>
When using a relative path, the path is relative to the URL of the page that contains the assignment. Trailing slashes are automatically removed.
Defines the default language which is used in the common resource files. Any resources for this language will only load the common resource file, but not the language-specific resource file. Default is 'en'.
Set mxDefaultLanguage prior to loading the Client library as follows to override this setting:
<script type="text/javascript">
mxDefaultLanguage = 'de';
</script>
<script type="text/javascript" src="js/Client.js"></script>
Basepath for all images URLs in the core without trailing slash. Default is <Client.basePath> + '/images'. Set mxImageBasePath prior to loading the Client library as follows to override this setting:
<script type="text/javascript">
mxImageBasePath = '/path/to/image/directory';
</script>
<script type="text/javascript" src="/path/to/core/directory/js/Client.js"></script>
When using a relative path, the path is relative to the URL of the page that contains the assignment. Trailing slashes are automatically removed.
Defines the language of the client, eg. en for english, de for german etc. The special value 'none' will disable all built-in internationalization and resource loading. See {@link Resources#getSpecialBundle} for handling identifiers with and without a dash.
Set mxLanguage prior to loading the Client library as follows to override this setting:
<script type="text/javascript">
mxLanguage = 'en';
</script>
<script type="text/javascript" src="js/Client.js"></script>
If internationalization is disabled, then the following variables should be overridden to reflect the current language of the system. These variables are cleared when i18n is disabled. <Editor.askZoomResource>, <Editor.lastSavedResource>, <Editor.currentFileResource>, <Editor.propertiesResource>, <Editor.tasksResource>, <Editor.helpResource>, <Editor.outlineResource>, {@link ElbowEdgeHandler#doubleClickOrientationResource}, {@link Utils#errorResource}, {@link Utils#closeResource}, {@link GraphSelectionModel#doneResource}, {@link GraphSelectionModel#updatingSelectionResource}, {@link GraphView#doneResource}, {@link GraphView#updatingDocumentResource}, {@link CellRenderer#collapseExpandResource}, {@link Graph#containsValidationErrorsResource} and {@link Graph#alreadyConnectedResource}.
Defines the optional array of all supported language extensions. The default language does not have to be part of this list. See {@link Resources#isLanguageSupported}.
<script type="text/javascript">
mxLanguages = ['de', 'it', 'fr'];
</script>
<script type="text/javascript" src="js/Client.js"></script>
This is used to avoid unnecessary requests to language files, ie. if a 404 will be returned.
Optional global config variable to force loading the JavaScript files in development mode. Default is undefined. NOTE: This is a global variable, not a variable of Client.
<script type="text/javascript">
let mxForceIncludes = false;
</script>
<script type="text/javascript" src="/path/to/core/directory/js/Client.js"></script>
Optional global config variable to toggle loading of the two resource files
in Graph and
<script type="text/javascript">
let mxLoadResources = false;
</script>
<script type="text/javascript" src="/path/to/core/directory/js/Client.js"></script>
Optional global config variable to toggle loading of the CSS files when the library is initialized. Default is true. NOTE: This is a global variable, not a variable of Client.
<script type="text/javascript">
let mxLoadStylesheets = false;
</script>
<script type="text/javascript" src="/path/to/core/directory/js/Client.js"></script>
Optional global config variable to specify the extension of resource files. Default is true. NOTE: This is a global variable, not a variable of Client.
<script type="text/javascript">
let mxResourceExtension = '.txt';
</script>
<script type="text/javascript" src="/path/to/core/directory/js/Client.js"></script>
Returns true if the current browser is supported, that is, if <Client.IS_SVG> is true.
Example:
if (!Client.isBrowserSupported())
{
mxUtils.error('Browser is not supported!', 200, false);
}
Adds a link node to the head of the document. Use this to add a stylesheet to the page as follows:
Client.link('stylesheet', filename);
where filename is the (relative) URL of the stylesheet. The charset is hardcoded to ISO-8859-1 and the type is text/css.
String that represents the rel attribute of the link node.
String that represents the href attribute of the link node.
Optional parent document of the link node.
unique id for the link element to check if it already exists
Generated using TypeDoc
Copyright (c) 2006-2017, JGraph Ltd Copyright (c) 2006-2017, Gaudenz Alder