///
///
///
///
///
///
///
///
///
declare class mxResources {
static get(key: string, params?: Array, defaultValue?: string): string;
loadDefaultBundle:Boolean;
static parse(text: any): any;
static getDefaultBundle(path:string, type:any):any;
}
declare class DiagramFormatPanel{
constructor(format:any, editorUi:any, container:any);
showPageView:boolean;
showBackgroundImageOption:boolean;
public init():void;
public addView(div:any);
public addOptions(div:any);
public addGridOption(container:any);
public addDocumentProperties(div:any);
public addPaperSize(div:any);
public addStyleOps(div:any);
public destroy(div:any);
}
declare class ChangePageSetup{
constructor(ui:any, color:any, image?:any, format?:any, pageScale?:any);
public execute():void;
}
declare class ArrangePanel{
constructor(format:any, editorUi?:any, container?:any);
public init():void;
public addTable(div:any):void;
public addLayerOps(div:any):void;
public addGrpupOps(div:any):void;
public addAlign(div:any):void;
public addFlip(div:any):void;
public addDistribute(div:any):void;
public addAngle(div:any):void;
}
declare class mxKeyHandler {
/**
* Constructs an event handler that executes functions bound to specific keystrokes.
* @author 鸿则
* @date 2020-01-09
* @param {mxGraph} graph Reference to the associated mxGraph.
* @param {*} target Optional reference to the event target.
* If null, the document element is used as the event target, that is,
* the object where the key event listener is installed.
*/
constructor(graph: mxGraph, target?: EventTarget);
/**
* Reference to the mxGraph associated with this handler.
*/
public graph: mxGraph;
/**
* Reference to the target DOM, that is, the DOM node where the key event listeners are installed.
*/
public target: EventTarget;
/**
* Maps from keycodes to functions for non-pressed control keys.
*/
public normalKeys: [(event: KeyboardEvent) => void];
/**
* Maps from keycodes to functions for pressed shift keys.
*/
public shiftKeys: [(event: KeyboardEvent) => void];
/**
* Maps from keycodes to functions for pressed control keys.
*/
public controlKeys: [(event: KeyboardEvent) => void];
/**
* Maps from keycodes to functions for pressed control and shift keys.
*/
public controlShiftKeys: [(event: KeyboardEvent) => void];
/**
* Specifies if events are handled. Default is true.
*/
public enabled: boolean;
/**
* Returns true if events are handled. This implementation returns enabled.
*/
public isEnabled(): boolean
/**
* Enables or disables event handling by updating enabled.
*/
public setEnabled(enabled: boolean): void;
/**
* Binds the specified keycode to the given function. This binding is used if the control key is not pressed.
*/
public bindKey(code: number, funct: (event: KeyboardEvent) => void): void;
/**
* Binds the specified keycode to the given function. This binding is used if the shift key is pressed.
*/
public bindShiftKey(code: number, funct: (event: KeyboardEvent) => void): void;
/**
* Binds the specified keycode to the given function. This binding is used if the control key is pressed.
*/
public bindControlKey(code: number, funct: (event: KeyboardEvent) => void): void;
/**
* Binds the specified keycode to the given function. This binding is used if the control and shift key are pressed.
*/
public bindControlShiftKey(code: number, funct: (event: KeyboardEvent) => void): number
/**
* Returns true if the control key is pressed. This uses mxEvent.isControlDown.
*/
public isControlDown(evt: KeyboardEvent): boolean;
/**
* Returns the function associated with the given key event or null if no function is associated with the given event.
*/
public getFunction(evt: KeyboardEvent): ((event: KeyboardEvent) => void);
/**
* Returns true if the event should be processed by this handler, that is, if the event source is either the target, one of its direct children, a descendant of the , or the mxGraph.cellEditor of the graph.
*/
public isGraphEvent(evt: KeyboardEvent): boolean;
/**
* Handles the event by invoking the function bound to the respective keystroke if isEnabledForEvent returns true for the given event and if isEventIgnored returns false, except for escape for which isEventIgnored is not invoked.
*/
public keyDown(evt: KeyboardEvent): boolean;
/**
* Returns true if the given event should be handled. isEventIgnored is called later if the event is not an escape key stroke, in which case escape is called. This implementation returns true if isEnabled returns true for both, this handler and graph, if the event is not consumed and if isGraphEvent returns true.
*/
public isEnabledForEvent(evt: KeyboardEvent): boolean
/**
* Returns true if the given keystroke should be ignored. This returns graph.isEditing().
*/
public isEventIgnored(evt: KeyboardEvent): boolean;
/**
* Hook to process ESCAPE keystrokes. This implementation invokes mxGraph.stopEditing to cancel the current editing, connecting and/or other ongoing modifications.
*/
public escape(evt: KeyboardEvent): void;
/**
* Destroys the handler and all its references into the DOM. This does normally not need to be called, it is called automatically when the window unloads (in IE).
*/
public destroy(): void;
}
/**
* XML codec for JavaScript object graphs. See {@link mxObjectCodec} for a
* description of the general encoding/decoding scheme. This class uses the
* codecs registered in {@link mxCodecRegistry} for encoding/decoding each object.
*
* ### References
*
* In order to resolve references, especially forward references, the mxCodec
* constructor must be given the document that contains the referenced
* elements.
*
* ### Examples
*
* The following code is used to encode a graph model.
*
* @example
* ```javascript
* var encoder = new mxCodec();
* var result = encoder.encode(graph.getModel());
* var xml = mxUtils.getXml(result);
* ```
*
* #### Example
*
* Using the code below, an XML document is decoded into an existing model. The
* document may be obtained using one of the functions in mxUtils for loading
* an XML file, eg. {@link mxUtils.get}, or using {@link mxUtils.parseXml} for parsing an
* XML string.
*
* @example
* ```javascript
* var doc = mxUtils.parseXml(xmlString);
* var codec = new mxCodec(doc);
* codec.decode(doc.documentElement, graph.getModel());
* ```
*
* #### Example
*
* This example demonstrates parsing a list of isolated cells into an existing
* graph model. Note that the cells do not have a parent reference so they can
* be added anywhere in the cell hierarchy after parsing.
*
* @example
* ```javascript
* var xml = '';
* var doc = mxUtils.parseXml(xml);
* var codec = new mxCodec(doc);
* var elt = doc.documentElement.firstChild;
* var cells = [];
*
* while (elt != null)
* {
* cells.push(codec.decode(elt));
* elt = elt.nextSibling;
* }
*
* graph.addCells(cells);
* ```
*
* #### Example
*
* Using the following code, the selection cells of a graph are encoded and the
* output is displayed in a dialog box.
*
* @example
* ```javascript
* var enc = new mxCodec();
* var cells = graph.getSelectionCells();
* mxUtils.alert(mxUtils.getPrettyXml(enc.encode(cells)));
* ```
*
* Newlines in the XML can be converted to
, in which case a '
' argument
* must be passed to {@link mxUtils.getXml} as the second argument.
*
* ### Debugging
*
* For debugging I/O you can use the following code to get the sequence of
* encoded objects:
*
* @example
* ```javascript
* var oldEncode = encode;
* encode(obj)
* {
* mxLog.show();
* mxLog.debug('mxCodec.encode: obj='+mxUtils.getFunctionName(obj.constructor));
*
* return oldEncode.apply(this, arguments);
* };
* ```
*
* Note that the I/O system adds object codecs for new object automatically. For
* decoding those objects, the constructor should be written as follows:
*
* @example
* ```javascript
* var MyObj(name)
* {
* // ...
* };
* ```
*
* @class mxCodec
*/
declare class mxCodec {
/**
* @constructor
*
* Constructs an XML encoder/decoder for the specified
* owner document.
*
* @param document - Optional XML document that contains the data.
* If no document is specified then a new document is created
* using {@link mxUtils.createXmlDocument}.
*/
constructor(document?: XMLDocument);
/**
* The owner document of the codec.
*/
document: XMLDocument;
/**
* Maps from IDs to objects.
*/
objects: Array;
/**
* Lookup table for resolving IDs to elements.
*/
elements: Array;
/**
* Specifies if default values should be encoded. Default is false.
*/
encodeDefaults: boolean;
/**
* Assoiates the given object with the given ID and returns the given object.
*
* @param id ID for the object to be associated with.
* @param obj Object to be associated with the ID.
*/
putObject(id: string, obj: any): any;
/**
* Returns the decoded object for the element with the specified ID in
* {@link document}. If the object is not known then {@link lookup} is used to find an
* object. If no object is found, then the element with the respective ID
* from the document is parsed using {@link decode}.
*/
getObject(id: string): any;
/**
* Hook for subclassers to implement a custom lookup mechanism for cell IDs.
* This implementation always returns null.
*
* Example:
*
* ```javascript
* var codec = new mxCodec();
* codec.lookup(id)
* {
* return model.getCell(id);
* };
* ```
*
* @param id ID of the object to be returned.
*/
lookup(id: string): any;
/**
* Returns the element with the given ID from {@link document}.
*
* @param id String that contains the ID.
*/
getElementById(id: string): Element;
/**
* Returns the element with the given ID from {@link document}.
*
* @param id String that contains the ID.
*/
updateElements(): void;
/**
* Adds the given element to {@link elements} if it has an ID.
*/
addElement(node: Node): void;
/**
* Returns the ID of the specified object. This implementation
* calls {@link reference} first and if that returns null handles
* the object as an {@link mxCell} by returning their IDs using
* {@link mxCell.getId}. If no ID exists for the given cell, then
* an on-the-fly ID is generated using {@link mxCellPath.create}.
*
* @param obj Object to return the ID for.
*/
getId(obj: any): string;
/**
* Hook for subclassers to implement a custom method
* for retrieving IDs from objects. This implementation
* always returns null.
*
* Example:
*
* ```javascript
* var codec = new mxCodec();
* codec.reference(obj)
* {
* return obj.getCustomId();
* };
* ```
*
* @param obj Object whose ID should be returned.
*/
reference(obj: any): any;
/**
* Encodes the specified object and returns the resulting
* XML node.
*
* @param obj Object to be encoded.
*/
encode(obj: any): XMLDocument;
/**
* Decodes the given XML node. The optional "into"
* argument specifies an existing object to be
* used. If no object is given, then a new instance
* is created using the constructor from the codec.
*
* The function returns the passed in object or
* the new instance if no object was given.
*
* @param node XML node to be decoded.
* @param into Optional object to be decodec into.
*/
decode(node: Node, into?: any): any;
/**
* Encoding of cell hierarchies is built-into the core, but
* is a higher-level function that needs to be explicitely
* used by the respective object encoders (eg. {@link mxModelCodec},
* {@link mxChildChangeCodec} and {@link mxRootChangeCodec}). This
* implementation writes the given cell and its children as a
* (flat) sequence into the given node. The children are not
* encoded if the optional includeChildren is false. The
* function is in charge of adding the result into the
* given node and has no return value.
*
* @param cell {@link mxCell} to be encoded.
* @param node Parent XML node to add the encoded cell into.
* @param includeChildren Optional boolean indicating if the
* function should include all descendents. Default is true.
*/
encodeCell(cell: mxCell, node: Node, includeChildren?: boolean): void;
/**
* Returns true if the given codec is a cell codec. This uses
* {@link mxCellCodec.isCellCodec} to check if the codec is of the
* given type.
*/
isCellCodec(codec: mxCodec): boolean;
/**
* Decodes cells that have been encoded using inversion, ie.
* where the user object is the enclosing node in the XML,
* and restores the group and graph structure in the cells.
* Returns a new {@link mxCell} instance that represents the
* given node.
*
* @param node XML node that contains the cell data.
* @param restoreStructures Optional boolean indicating whether
* the graph structure should be restored by calling insert
* and insertEdge on the parent and terminals, respectively.
* Default is true.
*/
decodeCell(node: Node, restoreStructures?: boolean): mxCell;
/**
* Inserts the given cell into its parent and terminal cells.
*/
insertIntoGraph(cell: mxCell): void;
/**
* Sets the attribute on the specified node to value. This is a
* helper method that makes sure the attribute and value arguments
* are not null.
*
* @param node XML node to set the attribute for.
* @param attributes Attributename to be set.
* @param value New value of the attribute.
*/
setAttribute(node: Node, attribute: string, value: any): void;
}
declare class mxUtils {
static mod(n: number, m: number): number;
/**
* Returns the value for the given key in the given associative array or the given default value if the value is null.
* @param array Associative array that contains the value for the key.
* @param key Key whose value should be returned.
* @param defaultValue Value to be returned if the value for the given key is null.
*/
static getValue(array: any, key: any, defaultValue: any): any;
/**
* Returns true if the specified point (x, y) is contained in the given rectangle.
* @param bounds mxRectangle that represents the area
* @param x X-coordinate of the point.
* @param y Y-coordinate of the point.
*/
static contains(bounds: mxRectangle, x: number, y: number): boolean;
/**
* Returns a wrapper function that locks the execution scope of the given function to the specified scope. Inside funct, the “this” keyword becomes a reference to that scope.
* @param scope
* @param func
*/
static bind(scope: any, func: Function): Function;
/**
* Converts the specified point (x, y) using the offset of the specified container and returns a new mxPoint with the result.
* @param container DOM node to use for the offset.
* @param x X-coordinate of the point to be converted.
* @param y Y-coordinate of the point to be converted.
*/
static convertPoint(container: HTMLElement, x: number, y: number): mxPoint;
/**
* Sets the opacity of the specified DOM node to the given value in %.
* @param node DOM node to set the opacity for.
* @param value Opacity in %. Possible values are between 0 and 100.
*/
static setOpacity(node: HTMLElement, value: number): void;
/**
* Creates and returns an image (IMG node) or VML image (v:image) in IE6 in
* quirks mode.
*
* @static
* @param {string} src URL that points to the image to be displayed.
* @returns {HTMLImageElement}
*/
public static createImage(src: string): HTMLImageElement;
/**
* Sorts the given cells according to the order in the cell hierarchy.
* Ascending is optional and defaults to true.
*
* @static
* @param {Array} cells
* @param {boolean} [ascending]
* @returns {Array}
*/
public static sortCells(cells: Array, ascending?: boolean): Array;
/**
* Returns the stylename in a style of the form [(stylename|key=value);] or
* an empty string if the given style does not contain a stylename.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style String of the form [(stylename|key=value);]
* @returns {string}
*/
public static getStylename(style: string): string;
/**
* Returns the stylenames in a style of the form [(stylename|key=value);]
* or an empty array if the given style does not contain any stylenames.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style String of the form [(stylename|key=value);]
* @returns {Array}
*/
public static getStylenames(style: string): Array;
/**
* Returns the index of the given stylename in the given style. This
* returns -1 if the given stylename does not occur (as a stylename) in the
* given style, otherwise it returns the index of the first character.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style
* @param {string} stylename
* @returns {number}
*/
public static indexOfStylename(style: string, stylename: string): number;
/**
* Adds the specified stylename to the given style if it does not already
* contain the stylename.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style
* @param {string} stylename
* @returns {string}
*/
public static addStylename(style: string, stylename: string): string;
/**
* Removes all occurrences of the specified stylename in the given style
* and returns the updated style. Trailing semicolons are not preserved.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style
* @param {string} stylename
* @returns {string}
*/
public static removeStylename(style: string, stylename: string): string;
/**
* Removes all stylenames from the given style and returns the updated style.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style
* @returns {string}
*/
public static removeAllStylenames(style: string): string;
/**
* Assigns the value for the given key in the styles of the given cells, or
* removes the key from the styles if the value is null.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {mxGraphModel} model {@link mxGraphModel} to execute the transaction in.
* @param {Array} cells Array of {@link mxCell } to be updated.
* @param {string} key Key of the style to be changed.
* @param {(string | number | null)} value New value for the given key.
*/
public static setCellStyles(model: mxGraphModel, cells: Array, key: string, value: string | number | null): void;
/**
* Adds or removes the given key, value pair to the style and returns the
* new style. If value is null or zero length then the key is removed from
* the style. This is for cell styles, not for CSS styles.
*
* @author 鸿则
* @date 2020-07-17
* @static
* @param {string} style String of the form [(stylename|key=value);].
* @param {string} key Key of the style to be changed.
* @param {(string|number|null)} value New value for the given key.
* @returns {string}
*/
public static setStyle(style: string, key: string, value: string|number|null): string;
/**
* Loads the specified URL asynchronously and invokes the given functions depending on the request status.
* Returns the mxXmlRequest in use.
* Both functions take the mxXmlRequest as the only parameter.
* See mxUtils.load for a synchronous implementation.
*/
static get(url: string,
onload?: (req: mxXmlRequest) => void,
onerror?: (req: mxXmlRequest) => void,
binary?: boolean,
timeout?: number,
ontimeout?: (req: mxXmlRequest) => void): void;
/**
* Loads the specified URL synchronously and returns the mxXmlRequest.
* Throws an exception if the file cannot be loaded.
* See mxUtils.get for an asynchronous implementation.
* @param url URL to get the data from.
*/
static load(url: string): mxXmlRequest;
/**
* Loads the URLs in the given array asynchronously and invokes the given function if all requests returned with a valid 2xx status.
* The error handler is invoked once on the first error or invalid response.
*/
static getAll(urls: Array, onload: (req: mxXmlRequest) => void, onerror: (err: mxXmlRequest) => void): void;
/**
* Returns the XML content of the specified node.
* For Internet Explorer, all \r\n\t[\t]* are removed from the XML string and the remaining \r\n are replaced by \n.
* All \n are then replaced with linefeed, or
if no linefeed is defined.
*
* @author 鸿则
* @date 2019-12-27
* @static
* @param {XMLDocument} node DOM node to return the XML for.
* @param {*} linefeed Optional string that linefeeds are converted into. Default is
*/
static getXml(node: XMLDocument, linefeed?: string): string;
static getPrettyXml(node:any, tab?:any, indent?:any, newline?:any, ns?:any);
/**
* Parses the specified XML string into a new XML document and returns the new document.
*
* @author 鸿则
* @date 2019-12-27
* @static
* @param {string} xml
* @returns {XMLDocument}
*/
static parseXml(xml: string): XMLDocument;
/**
* Returns true if the given ancestor is an ancestor of the given DOM node in the DOM.
* This also returns true if the child is the ancestor.
*
* @author 鸿则
* @date 2020-01-07
* @static
* @param {Node} ancestor DOM node that represents the ancestor.
* @param {Node} child DOM node that represents the child.
* @returns {boolean}
*/
static isAncestorNode(ancestor: Node, child: Node): boolean;
static makeDraggable(
element: HTMLElement,
graphF: mxGraph,
funct: Function,
dragElement?: Node,
dx?: number,
dy?: number,
autoscroll?: boolean,
scalePreview?: boolean,
highlightDropTargets?: boolean,
getDropTarget?: (graph: mxGraph, x: number, y: number, evt: PointerEvent) => mxCell,
): mxDragSource;
static createXmlDocument(): XMLDocument;
/**
* Returns the offset for the specified container as an mxPoint.
* The offset is the distance from the top left corner of the container to the top left corner of the document.
*
* @author 鸿则
* @date 2020-01-09
* @static
* @param {HTMLElement} container
* @param {boolean} scrollOffset
* @returns {mxPoint}
*/
static getOffset(container: HTMLElement, scrollOffset?: boolean): mxPoint;
/**
* Returns the top, left corner of the viewrect as an mxPoint.
*
* @author 鸿则
* @date 2020-01-09
* @static
* @param {HTMLElement} node
* @param {boolean} [includeAncestors]
* @param {boolean} [includeDocument]
* @returns {mxPoint}
*/
static getScrollOrigin(node: HTMLElement, includeAncestors?: boolean, includeDocument?: boolean): mxPoint;
static importNode(doc: Document, node: any, allChildren: any): any;
static removeWhitespace(node: any, before: boolean): void;
static hasScrollbars(container: HTMLElement): boolean;
/**
* Recursively clones the specified object ignoring all field names in the given array of transient fields.
* {@link mxObjectIdentity.FIELD_NAME} is always ignored by this function.
*
*
* @param obj Object to be cloned.
* @param transients Optional array of strings representing the field name to be ignored.
* @param shallow Optional boolean argument to specify if a shallow clone should be created, that is, one where all
* object references are not cloned or, in other words, one where only atomic (strings, numbers) values
* are cloned. Default is false.
*/
static clone(obj: any, transients?: Array, shallow?: boolean): any;
/**
* Displays the given alert in a new dialog. This implementation uses the
* built-in alert function. This is used to display validation errors when
* connections cannot be changed or created.
*
* @param message The message to be displayed.
*/
static alert(message: string): void;
/**
* Displays the given error message in a new of the given width.
* If close is true then an additional close button is added to the window.
* The optional icon specifies the icon to be used for the window. Default
* is {@link mxUtils.errorImage}.
*
* @param message The message to be displayed.
* @param width The width of the window.
* @param close Optional boolean indicating whether to add a close button.
* @param icon Optional icon for the window decoration (path to the icon).
*/
static error(message: string, width: number, close?: boolean, icon?: string): void;
}
declare class mxEventObject {
constructor(name: string, ...args: any[]);
/**
* Variable: name
*
* Holds the name.
*/
name: string;
/**
* Variable: properties
*
* Holds the properties as an associative array.
*/
properties: any[];
/**
* Variable: consumed
*
* Holds the consumed state. Default is false.
*/
consumed: boolean;
/**
* Function: getName
*
* Returns .
*/
getName(): string;
/**
* Function: getProperties
*
* Returns .
*/
getProperties(): any[];
/**
* Function: getProperty
*
* Returns the property for the given key.
*/
getProperty(key: string): any;
/**
* Function: isConsumed
*
* Returns true if the event has been consumed.
*/
isConsumed(): boolean;
/**
* Function: consume
*
* Consumes the event.
*/
consume(): void;
}
/**
* Actions
*/
export class Actions extends mxEventSource {
constructor(editorUi?: EditorUi);
//set of addAction function calls to add actions to items created in Menu.js
init(): void;
//method used to addActions to the keys created in menus
addAction(key: string, funct: void, enabled?: number, iconCls?: number, shortcut?: string): any;
//to Register the given action under the given name.
put(name: string, action: void): any;
}
export class Action extends mxEventSource {
constructor(label: string, enabled?: boolean, iconCls?: any, shortcut?: any);
/**
* Sets the enabled state of the action and fires a stateChanged event
*/
createFunction(funct: any): any;
/**
* Sets the enabled state of the action and fires a stateChanged event.
*/
setEnabled(value: any);
/**
* Sets the enabled state of the action and fires a stateCHanged event;
*/
isEnabled(): any;
/**
* Sets the enabled state of the action and fires a stateChanged event.
*/
setToggleAction(value: string): any;
/**
* Sets the enabled state of the action and fires a stateChanged event.
*/
setSelectedCallback(funct: any);
/**
* Sets the enabled state of the action and fires a stateChanged event
*/
isSelected();
}
/**
* Dialogs
*/
export class OpenDialog {
constructor();
}
/**
* Constructs a new color dialog.
*/
export class ColorDialog {
constructor(editorUi: EditorUi, color?: string, apply?: any, cancelFn?: any);
/**
* Creates function to apply value.
*/
presetColors: Array
/**
* Creates function to apply value
*/
defaultColors: Array
/**
* Creates function to apply value
*/
createApplyFunction(): mxUtils;
/**
*
*/
recentColors: Array
/**
* Adds recent color for later use.
*/
addRecentColor(color: string, max: number): void;
/**
* Clears recent color.
*/
resentRecentColors(): void;
}
/**
* Contructs a new about dialog.
*/
export class AboutDialog {
constructor(editorUi: EditorUi);
}
/**
* Contructs a new textarea dialog.
*/
export class TextareaDialog {
constructor(editorUi: EditorUi, title: string, url?: string, fn?: any, cancelFn?: any, cancelTitle?: any, w?: number, h?: number, addButtons?: any, noHide?: any, noWrap?: any, applyTitle?: any, helpLink?: any, customButtons?: any)
}
/**
* Contructs a new edit file dialog.
*/
export class EditDiagramDialog {
constructor(editorUi: EditorUi);
showNewWindowOption: boolean;
}
/**
* Constructs a new export dialog.
*/
export class ExportDialog {
constructor(editorUi);
/**
* Remembers last value for border.
*/
lastBorderValue: number;
/**
* Global switched for the export dialog.
*/
showGifOption: boolean;
/**
* Global switches for the export dialog.
*/
showXmlOption: boolean;
/**
* Hook for getting the export format. Returns null for the default
* intermediate XML export format or a function that returns the
* parameter and value to be used in the request in the form
* key=value, where value should be URL encoded
*/
exportfile(editorUi: EditorUi, name: string, format?: string, bg?: string, s?: any, b?: any, dpi?: any): void;
/**
* Hook for getting the export format. Returns null for the default
* intermediate XML export format or a function that returns the
* parameter and value to be used in the request in the form
* key=value, where value should be URL encoded.
*/
saveLocalFile(editorUi: EditorUi, data?: any, filename?: string, format?: string): void;
}
/**
* Constructs a new metadta dialog.
*/
export class EditDataDialog {
constructor();
/**
* Optional help link.
*/
getDisplayIdForCell(ui: EditorUi, cell: mxCell): any;
/**
* Optional help link.
*/
placeholderHelpLink: any;
}
/**
* Contructs a new link dialog.
*/
export class LinkDialog {
constructor(editorUi: EditorUi, initialValue?: any, btnLabel?: any, fn?: any)
}
/**
*
*/
export class OutlineWindow {
constructor(editorUi: EditorUi, x?: number, y?: number, w?: any, h?: any)
}
/**
*
*/
export class LayersWindow {
constructor(editorUi: EditorUi, x?: number, y?: number, w?: any, h?: any)
}
/**
* Editor
*/
export class Editor extends mxEventSource {
constructor(chromeless: any, themes: Object, model?: any, graph?: any, editable?: any);
/**
* Counts open editor tabs (must be global for cross-window access)
*/
pageCounter: number;
/**
* Specifies if local storage should be used (eg. on the iPad which has no filesystem)
*/
undoManager:any;
useLocalStorage: any;
moveImage: string;
helpImage: string;
checkmarkImage: string;
maximizeImage: string;
zoomOutImage: string;
zoomInImage: string;
zoomFitImage: string;
layersImage: string;
previousImage: string;
nextImage: string;
editImage: string;
zoomOutLargeImage: string;
zoomInLargeImage: string;
actualSizeLargeImage: string;
printLargeImage: string;
layersLargeImage: string;
closeLargeImage: string;
editLargeImage: string;
previousLargeImage: string;
nextLargeImage: string;
refreshLargeImage: string;
backLargeImage: string;
fullscreenLargeImage: string;
ctrlKey: string;
hintOffset: number;
popupsAllowed: boolean;
/**
* Stores initial state of mxClient.NO_FO.
*/
originalNoForeignObject: any;
/**
* Specifies the image URL to be used for the transparent background.
*/
transparentImage: string;
/**
* Specifies if the canvas should be extended in all directions. Default is true.
*/
extendCanvas: boolean;
/**
* Specifies if the app should run in chromeless mode. Default is false.
* This default is only used if the contructor argument is null.
*/
chromeless: boolean;
/**
* Specifies the order of OK/Cancel buttons in dialogs. Default is true.
* Cancel first is used on Macs, Windows/Confluence uses cancel last.
*/
cancelFirst: boolean;
/**
* Specifies if the editor is enabled. Default is true.
*/
enabled: boolean;
/**
* Contains the name which was used for the last save. Default value is null.
* @default null
*/
filename: any;
/**
* Contains the current modified state of the diagram. This is false for
* new diagrams and after the diagram was saved.
*/
modified: boolean;
/**
* Specifies if the diagram should be saved automatically if possible.
* @default true
*/
autosave: boolean;
/**
* Specifies the top spacing for the initial page view. Default is 0.
* @default 0
*/
initialTopSpacing: number;
/**
* Specifies the app name. Default is document.title.
* @default document.title
*/
appName: any;
editBlankUrl: string;
/**
* Default value for the graph container overflow style.
*/
defaultGraphOverflow: string;
/**
* Initializes the environment.
*/
init(): void;
/**
* Sets the XML node for the current diagram.
*/
isChromelessView(): any;
/**
* Sets the XML node for the current diagram.
*/
setAutosave(value): void;
getEditBlankUrl(params: any);
editAsNew(xml: any, title: any): void;
/**
* Sets the XML node for the current diagram.
*/
createGraph(themes: any, model: Graph): Graph;
/**
* Sets the XML node for the current diagram.
*/
resetGraph(): void;
/**
* Sets the XML node for the current diagram.
*/
readGraphState(node: Node): void;
/**
* Sets the XML node for the current diagram.
*/
setGraphXml(node: Node): void;
/**
* Returns the XML node that represents the current diagram.
*/
getGraphXml(ignoreSelection: string): Node;
/**
* Keeps the graph container in sync with the persistent graph state
*/
updateGraphComponents(): void;
/**
* Sets the modified flag.
*/
setModified(value: boolean): void;
/**
* Sets the filename.
*/
setFilename(value: boolean): void;
/**
* Creates and returns a new undo manager.
*/
createUndoManager(): any;
/**
* Adds basic stencil set (no namespace).
*/
initStencilRegistry(): void;
}
/**
* EditorUi
*/
export class EditorUi {
constructor(editor: Editor, container?: any, lightbox?: any);
/**
* Global config that specifies if the compact UI elements should be used.
*/
compactUi: boolean;
/**Specifies the size of the split bar.
*/
splitSize: number;
/**
* Specifies the height of the menubar
* @default true
*/
menubarHeight: number;
/**
* Specifies the width of the format panel should be enabled
* @default true
*/
formatEnabled: boolean;
/**
* Specifies the width of the format panel
* @default 240
*/
formatWidth: number;
/**
* Specifies the height of the toolbar
* @default 38
*/
toolbarHeight: number;
/**
* Specifies the height of the footer
* @default 28
*/
footerHeight: number;
/**
* Specifies the height of the optional sidebarFooterContainer
* @default 34
*/
sidebarFooterContainer: number;
/**
* Specifies the position of the horizontal split bar
*/
hsplitPosition: number;
/**
* Specifies if animation are allowed in
* @default true
*/
allowAnimation: boolean;
/**
* @default 2
*/
lightBoxMaxFitScale: number;
/**
* Specifies if single click on horizontal split should collapse sidebar.
* @default false
*/
hsplitClickEnabled: boolean;
/**
* Installs the listeners to update the action states.
*/
init(): void;
/**
* Returns true if the given event should start editing
*/
onKeyDown(evt: Event): boolean;
/**
* Returns true if the given event should start editing. This implementation returns true.
*/
onKeyPress(evt: Event): boolean;
/**
* Returns true if the given event should start editing. This implementation returns true.
*/
isImmediateEditingEvent(evt: Event): boolean;
/**
* Private helper method.
*/
getCssClassForMarker(prefix: string, shape: string, marker: string, fill: string): string;
/**
* Overridden in Menus.js
*/
createMenus(): Menus;
/**
* Hook for allowing selection and context menu for certain events.
*/
updatePasteActionStates(): void;
/**
* Hook for allowing selection and context menu for certain events.
*/
initClipboard(): void;
/**
* Delay between zoom steps when not using preview.
*/
lazyZoomDelay: number;
/**
* Delay before update of DOM when using preview.
*/
wheelZoomDelay: number;
/**
* Delay before update of DOM when using preview.
*/
buttonZoomDelay: number;
/**
* Initializes the infinite canvas.
*/
initCanvas(): void;
/**
* Creates a temporary graph instance for rendering off-screen content.
*/
addChromelessToolbarItems(addButton: any): void;
/**
* Creates a temporary graph instance for rendering off-screen content.
*/
createTemporaryGraph(stylesheet: string): Graph;
/**
*
*/
addChromelessClickHandler(): void;
/**
* Toggle Right side panel
*/
toggleFormatPanel(forceHide: number);
/**
* Adds support for placeholders in labels.
*/
lightboxFit(maxHeight: number): void;
/**
* Translates this point by the given vector.
* look for return type
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
isDiagramEmpty(): any;
/**
* Hook for allowing selection and context menu for certain events.
*/
isSelectionAllowed(evt: Event): any;
/**
* Installs dialog if browser window is closed without saving
* This must be disabled during save and image export.
*/
addBeforeUnloadListener(): any;
/**
* Sets the onbeforeunload for the application
*/
onBeforeUnload(): any;
/**
* Opens the current diagram via the window.opener if one exists.
*/
open(): void;
/**
* Sets the current menu and element.
* menu:MENU,elt:element?
*/
setCurrentMenu(menu: any, elt: any): void;
/**
* Resets the current menu and element.
*/
resetCurrentMenu(): void;
/**
* Hides and destroys the current menu.
*/
hideCurrentMenu(): void;
/**
* Updates the document title.
*/
updateDocumentTitle(): void;
/**
* creates hover icons.
* HoverIcons
*/
createHoverIcons(): any;
/**
* Returns the URL for a copy of this editor with no state.
*/
redo(): void;
/**
* Returns the URL for a copy of this editor with no state.
*/
undo(): void;
/**
* Returns the URL for a copy of this editor with no state.
*/
canRedo(): any;
/**
* Returns the URL for a copy of this editor with no state.
*/
canUndo(): any;
/**
*
*/
getEditBlankXml(): any;
/**
* Returns the URL for a copy of this editor with no state.
*/
getUrl(pathname: string): string;
/**
* Specifies if the graph has scrollbars.
*/
setScrollbars(value: any): void;
/**
* Returns true if the graph has scrollbars.
*/
hasScrollbars(): any;
/**
* Resets the state of the scrollbars.
*/
resetScrollbars(): void;
/**
* Loads the stylesheet for this graph.
*/
setPageVisible(value: any): void;
/**ChangePageSetup function on 2380 think about it. */
/**
* Loads the stylesheet for this graph.
*/
setBackgroundColor(value: any): void;
/**
* Loads the stylesheet for this graph.
*/
setFoldingEnabled(value: any): void;
/**
* Loads the stylesheet for this graph.
*/
setPageFormat(value: any): void;
/**
* Loads the stylesheet for this graph.
*/
setPageScale(value: any): void;
/**
* Loads the stylesheet for this graph.
*/
setGridColor(value: any): void
/**
* Updates the states of the given undo/redo items.
*/
addUndoListener(): void;
/**
* Updates the states of the given toolbar items based on the selection.
*/
updateActionStates(): void;
zeroOffset: any;
getDiagramContainerOffset(): any;
/**
* Refreshes the viewport.
*/
refresh(sizeDidChange: boolean): void;
/**
* Creates the required containers.
*/
createTabContainer(): null;
/**
* Creates the required containers.
*/
createDivs(): void;
/**
* Hook for sidebar footer container. This implementation returns null.
*/
createSidebarFooterContainer(): null;
/**
* Creates the required containers.
*/
createUi(): void;
/**
* Creates a new toolbar for the given container.
*/
createStatusContainer(): any;
/**
* Creates a new toolbar for the given container.
*/
setStatusText(value: string): void;
/**
* Creates a new toolbar for the given container.
*/
createToolbar(container: any): any;
/**
* Creates a new sidebar for the given container.
*/
createSidebar(container: any): any;
/**
* Creates a new sidebar for the given container.
*/
createFormat(container: any): any;
/**
* Creates and returns a new footer.
*/
createFooter(): any;
/**
* Creates the actual toolbar for the toolbar container.
*/
createDiv(classname: string): any;
/**
* Updates the states of the given undo/redo items.
*/
addSplitHandler(elt: any, horizontal: any, dx: any, onChange: any): void;
/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
handleError(resp: any, title: any, fn: any, invokeFnOnClose: any, notFoundMessage: any): void;
/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
showError(title: string, msg: string, btn: any, fn: any, retry: any, btn2: any, fn2: any, btn3: any, fn3: any, w: number, h: number, hide: any, onClose: any): void;
/**
* Displays a print dialog.
*/
showDialog(elt: any, w: number, h: number, modal: any, closable: any, onClose: any, noScroll: any, transparent: any, onResize: any, ignoreBgClick: any): void;
/**
* Displays a print dialog.
*/
hideDialog(cancel: any, isEsc: any): void;
/**
* Display a color dialog.
*/
pickColor(color: string, apply: any): void;
/**
* Adds the label menu items to the given menu and parent.
*/
openFile(): void;
/**
* Extracs the graph model from the given HTML data from a data transfer event.
*/
extractGraphModelFromHtml(data: string): string;
/**
* Opens the given files in the editor.
*/
extractGraphModelFromEvent(evt: Event): any;
/**
* Hook for subclassers to return true if event data is a supported format.
* This implementation always returns false.
*/
isCompatibleString(data): boolean;
/**
* Adds the label menu items to the given menu and parent.
*/
saveFile(forceDialog: any): boolean;
/**
* Saves the current graph under the given filename.
*/
save(name: string): any;
/**
* Executes the given layout.
*/
executeLayout(exec: any, animate: any, post: any): void;
/**
* Hides the current menu.
*/
showImageDialog(title: string, value: any, fn: any, ignoreExisting: any): void;
/**
* Hides the current menu.
*/
showLinkDialog(value: any, btnLabel: string, fn: any): void;
/**
* Hides the current menu.
*/
showDataDialog(cell: any): void;
/**
* Hides the current menu.
*/
showBackgroundImageDialog(apply: any): void;
/**
* Loads the stylesheet for this graph.
*/
setBackgroundImage(image: any): void;
/**
* Creates the keyboard event handler for the current graph and history.
*/
confirm(msg: string, okFn: any, cancelFn: any): void;
/**
* Creates the keyboard event handler for the current graph and history.
*/
createOutline(wnd: any): any;
// Alt+Shift+Keycode mapping to action
altShiftActions: object;
/**
* Creates the keyboard event handler for the current graph and history.
*/
createKeyHandler(editor: any): any;
/**
* Creates the keyboard event handler for the current graph and history.
*/
destroy(): void;
}
/**
* Format
*/
export class Format {
constructor(editorUi: EditorUi, container: any)
/**
* Returns information about the current selection.
*/
labelIndex: number;
/**
* Returns information about the current selection.
*/
currentIndex: number;
/**
* Returns information about the current selection.
*/
showCloseButton: boolean;
/**
* Background color for inactive tabs.
*/
inactiveTabBackgroundColor: string;
/**
* Background color for inactive tabs.
*/
roundableShapes: Array;
/**
* Adds the label menu items to the given menu and parent.
*/
init(): void;
/**
* Returns information about the current selection.
*/
clearSelectionState(): void;
/**
* Returns information about the current selection.
*/
getSelectionState(): any;
/**
* Returns information about the current selection.
*/
createSelectionState(): any;
/**
* Returns information about the current selection.
*/
initSelectionState(): Object;
/**
* Returns information about the current selection.
*/
updateSelectionStateForCell(result: any, cell?: mxCell, cells?: any): void;
/**
* Returns information about the current selection.
*/
isFillState(state: any): any;
/**
* Returns information about the current selection.
*/
isGlassState(state: any): any;
/**
* Returns information about the current selection.
*/
isRoundedState(state: any): any;
/**
* Returns information about the current selection.
*/
isLineJumpState(state: any): any;
/**
* Returns information about the current selection.
*/
isComicState(state: any): any;
/**
* Returns information about the current selection.
*/
isAutoSizeState(state: any): any;
/**
* Returns information about the current selection.
*/
isImageState(state: any): any;
/**
* Returns information about the current selection.
*/
isShadowState(state: any): any;
/**
* Adds the label menu items to the given menu and parent.
*/
clear(): void;
/**
* Adds the label menu items to the given menu and parent.
*/
refresh(): any;
}
export class BaseFormatPanel {
constructor(format: Format, editorUi?: EditorUi, container?: any)
buttonBackgroundColor: string;
/**
* Adds the given color option.
*/
getSelectionState(): any;
/**
* Install input handler.
*/
installInputHandler(input: any, key?: any, defaultValue?: any, min?: any, max?: any, unit?: any, textEditFallback?: any, isFloat?: any)
/**
* Adds the given option.
*/
createPanel(): any;
/**
* Adds the given option.
*/
createTitle(title: string): HTMLElement;
/**
*
*/
createStepper(input: any, update: any, step?: any, height?: number, disableFocus?: boolean, defaultValue?: string, isFloat?: boolean);
/**
* Adds the given option.
*/
createOption(label:string,isCheckedFn:any,setCheckedFn:any,listner:any)
}
/**
* Graph
*/
export class Graph {
constructor(container: any, model: any, renderHint: any, stylesheet: any, themes: any, standalone: any)
/**
* Specifies if the touch UI should be used (cannot detect touch in FF so always on for Windows/Linux)
*/
touchStyle: string;
/**
* Shortcut for capability check.
*/
fileSupport: string;
/**
* Default size for line jumps.
*/
lineJumpsEnabled: boolean;
/**
* Default size for line jumps.
*/
defaultJumpSize: number;
/**
* Minimum width for table columns.
*/
minTableColumnWidth: number;
/**
* Minimum height for table rows.
*/
minTableRowHeight: number;
/**
* Text for foreign object warning.
*/
foreignObjectWarningText: string;
/**
* Link for foreign object warning.
*/
foreignObjectWarningLink: string;
/**
* Helper function for creating SVG data URI.
*/
createSvgImage(w: number, h: number, data: string, coordWidth: number, coordHeight: number): any;
/**
* Removes all illegal control characters with ASCII code <32 except TAB, LF
* and CR.
*/
zapGremlins(text: Array): Array;
/**
* Turns the given string into an array.
*/
stringToBytes(str: string): Array;
/**
* Turns the given array into a string.
*/
bytesToString(arr: Array): string;
/**
* Returns a base64 encoded version of the compressed outer XML of the given node.
*/
compressNode(node: Node, checked: any): Graph;
/**
* Returns a base64 encoded version of the compressed string.
*/
compress(data: any, deflate: any): any;
/**
* Returns a decompressed version of the base64 encoded string.
*/
decompress(data: any, inflate: any, checked: any): any;
/**
* Redirects to Graph.zapGremlins.
*/
zapGremlins(text: any): any;
/**Hovericons */
tableResized(table: any): void;
/**
* Updates column width and row height.
*/
setRowHeight(row: any, height: number): void;
/**
* Updates column width and row height.
*/
tableRowResized(row: any, bounds: any, prev: any): void;
defaultVertexStyle: object;
/**
* Contains the default style for edges.
*/
defaultEdgeStyle: object;
/**
* Returns the current edge style as a string.
*/
createCurrentEdgeStyle(): string;
/**
* Hook for subclassers.
*/
getPagePadding(): mxPoint;
/**
* Loads the stylesheet for this graph.
*/
loadStylesheet(): void;
/**
* Creates lookup from object IDs to cell IDs.
*/
createCellLookup(cells: any, lookup?: Object): Object;
/**
* Creates lookup from original to cloned cell IDs where mapping is
* the mapping used in cloneCells and lookup is a mapping from
* object IDs to cell IDs.
*/
createCellMapping(mapping: any, lookup?: Object, cellMapping?: Object): Object;
importGraphModel(node: Node, dx: number, dy: number, crop?: any): any;
/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
encodeCells(cells: any): any;
/**
* Overrides cloning cells in moveCells.
*/
/**
* @param cells Array of {@link mxCell} to be moved, cloned or added to the target.
* @param dx Integer that specifies the x-coordinate of the vector. Default is 0.
* @param dy Integer that specifies the y-coordinate of the vector. Default is 0.
* @param clone Boolean indicating if the cells should be cloned. Default is false.
* @param target {@link mxCell} that represents the new parent of the cells.
* @param evt Mouseevent that triggered the invocation.
* @param mapping Optional mapping for existing clones.
*/
moveCells(cells: any, dx: number, dy: number, clone: boolean, target?: any, evt?: Event, mapping?: any): any;
/**
* Updates cells IDs for custom links in the given cells.
*/
updateCustomLinks(mapping: any, cells: any): any;
}
/**
* Init
*/
export class window {
MAX_REQUEST_SIZE: number;
CSS_STYLE: string;
}
/**
* Menus
*/
export class Menus extends EditorUi {
constructor(EditorUI: EditorUi);
/**
* Sets the default font family
*/
defaultFont: string;
/**
* Sets the default font size
*/
defaultFontSoze: string;
/**
* Sets the default font size
*/
defaultMenuItems: Array;
/**
* Adds the label menu items to the given menu and parent
*/
defaultFonts: Array;
/**
* Adds the label menu items to the given menu and parent
*/
init(): void;
/**
* Adds the label menu items to the given menu and parent
*/
put(name: string, menu?: any): any;
/**
* Adds the label menu items to the given menu and parent
*/
get(name: string): Object;
/**
* Adds the given submenu
*/
addSubmenu(name: string, menu: Menus, parent: any, label: any): any;
/**
* Adds the label menu items to the given menu and parent
*/
addMenu(name: string, menu: any, submenu: any): void;
/**
* Adds a menu item to insert a table
*/
addInsertTableItem(menu: any, insertFn: any): void;
/**
* Adds a style change item to the given menu
*/
edgeStyleChange(menu: any, label?: string, keys?: Array, values?: any, sprite?: any, parent?: any, reset?: any): any;
/**
* Adds a style change item to the given menu.
*/
styleChange(menu: any, label: any, keys?: any, values?: any, sprite?: any, parent?: any, fn?: any, post?: any)
createStyleChangeFunction(keys: any, values: any): void;
/**
* Creates the keyboard event handler for the current graph and history.
*/
addMenuItem(menu: any, key: any, parent?: any, trigger?: any, sprite?: any, label?: any)
/**
* Creates the keyboard event handler for the current graph and history.
*/
addMenuItems(menu: any, keys: any, parent?: any, trigger?: any, sprites?: any)
/**
* Creates the keyboard event handler for the current graph and history.
*/
createPopupMenu(menu: any, cell: any, evt: any)
createMenus(): Menus;
}
export class Menu extends mxEventSource {
constructor(funct: any, enabled?: boolean)
/**
* Sets the enabled state of the action and fires a stateChanged event.
*/
isEnabled(): any;
/**
* Sets the enabled state of the action and fires a stateChanged event
*/
setEnabled(value: any): void;
/**
* Sets the enabled state of the action and fires a stateChanged event.
*/
execute(menu: Menus, parent: any): void;
}
/**
* Sidebar
*/
export class Sidebar{
constructor(editorUi: EditorUi, container: Object);
/**
* Adds all palettes to the sidebar.
*/
init(): void;
/**
* Sets the default font size.
*/
collapsedImage: string;
/**
* Sets the default font size.
*/
expandedImage: string;
/**
*
*/
searchImage: string;
/**
* Specifies if tooltips should be visible. Default is true.
*/
dragPreviewBorder: boolean;
/**
* Specifies if tooltips should be visible
* @default true
*/
enableTooltips: boolean;
/**
* Specifies the delay for the tooltip.
* @default 16
*/
tooltipBorder: number;
/**
* Specifies the delay for the tooltip.
* @default 300
*/
tooltipDelay: number;
/**
* Specifies the delay for the drop target icons.
* @default 200
*/
dropTargetDelay: number;
/**
* Specifies the URL of the gear image.
*/
gearImage: string;
/**
* Specifies the width of the thumbnails.
*/
thumbWidth: number;
/**
* Specifies the height of the thumbnails.
*/
thumbHeight: number;
/**
* Specifies the widht of the thumbnails.
*/
minThumbStrokeWidth: number;
/**
* Specifies the padding for the thumbnails.
* @default 3
*/
thumbPadding: number;
/**
* Specifies the delay for the tooltip
* @default 2
*/
thumbBorder: number;
/**
* Specifies the size of the sidebar titles.
*/
sidebarTitleSize: number;
/**
* Specifies if titles in the sidebar should be enabled.
*/
sidebarTitles: boolean;
/**
* Specifies if titles in the tooltips should be enabled.
*/
tooltipTitles: boolean;
/**
* Specifies if titles in the tooltips should be enabled.
*/
maxTooltipWidth: number;
/**
* Specifies if titles in the tooltips should be enabled.
*/
maxTooltipHeight: number;
/**
* Specifies if stencils files should be loaded and added to the search index
* when stencil palettes are added. If this is false when the stencilfiles
* are lazy-loaded when the palette is shown.
*/
addStencilsToIndex: boolean;
/**
* Specifies the width for clipart images.
* @default 80
*/
defaultImageWidth: number;
/**
* SPecifies the height for clipart images.
* @default 80
*/
defaultImageHeight: number;
/**
* Adds all palettes to the sidebar.
*/
getTooltipOffset(): mxPoint;
/**
* Adds app palettes to the sidebar11
*/
showTooltip(elt: any, cells: mxCell[], w: number, h: number, title?: string, showLabel?: boolean)
/**
* Hides the current tooltip
*/
hideTooltip(): void;
/**
* Hides the current tooltip
*/
addDataEntry(tags: string, width: number, height: number, title?: string, data?: any): any;
/**
* Adds the given entries to the search index.
*/
addEntries(images: Array): any;
/**
* Hides the current tooltip.
*/
addEntry(tags: string, fn: any): any;
/**
* Adds shape search UI.
*/
searchEntries(searchTerms: string, count: number, page?: number, success?: any, error?: any): any;
/**
* Adds shape search UI
*/
filterTags(tags: string): any;
/**
* Adds the general palette to the sidebar.
*/
cloneCell(cell: mxCell, value: any): mxCell;
/**
* Adds shape search UI.
*/
addSearchPalette(expand: boolean);
/**
* Adds the general palette to hthe sidebar.
*/
insertSearchHint(div: HTMLElement, searchTerm?: any, count?: any, page?: any, results?: any, len?: any, more?: any, terms?: any);
/**
* Adds the genral palette to the sidebar.
*/
addGeneralPalette(expand: boolean): void;
/**
* Adds the general palette tot he sidebar.
*/
addMiscPalette(expand: boolean): any;
/**
* Adds the container palette to the sidebar.
*/
addAdvancedPalette(expand: boolean): any;
/**
* Adds the container palette to the sidebar.
*/
createAdvancedShaped(): Array;
/**
* Adds the general palette to the sidebar.
*/
addUmlPalette(expand: boolean): any;
/**
* Adds the BPMN library to the sidebar.
*/
addBpmnPalette(dir: any, expand: any): any;
/**
* Creates and returns the given title element.
*/
createTitle(label: string): any;
/**
* Creates a thumbnail for the given cells.
*/
createThumb(cells: mxCell, width: number, height: number, parent?: any, title?: any, showLable?: boolean, showTitle?: boolean, realWidth?: any, realHeight?: any): any;
/**
* Creates and returns a new palette item for the given image.
*/
createItem(cells: mxCell, title: string, showLabel?: boolean, showTitle?: boolean, width?: number, height?: number, allowCellsInserted?: any): any;
/**
* Creates a drop handler for inserting the given cells.
*/
updateShapes(source: any, targets?: any): any;
/**
* Creates a drop handler for inserting the given cells.
*/
createDropHandler(cells: mxCell, allowSplit?: boolean, allowCellsInserted?: boolean, bounds?: any): any;
/**
* Creates and returns a preview element for the given width and height.
*/
createDragPreview(width: number, height: number): any;
/**
* Creates a drag source for the given element.
*/
dropAndConnect(source?: any, targets?: any, direction?: any, dropCellIndex?: any, evt?: any): any;
/**
* Creates a drag source for the given element.
*/
getDropAndConnectGeometry(source: any, target?: any, direction?: any, targets?: any): any;
/**
* Limits drop style to non-transparent source shapes.
*/
isDropStyleEnabled(cells: mxCell, firstVertex?: string): boolean;
/**
* Ignored swimlanes as drop style targets.
*/
isDropStyleTargetIgnored(state?: any): any;
/**
* Creates a drag source for the given element.
*/
createDragSource(elt: any, dropHandler?: any, preview?: any, cells?: any, bounds?: any): any;
/**
* Adds a handler for inserting the cell with a single click.
*/
itemClicked(cells: mxCell, ds?: any, evt?: any, elt?: any): void;
/**
* Adds a handler for inserting the cell with a single click.
*/
addClickHandler(elt: HTMLElement, ds?: any, cells?: mxCell): void;
/**
* Creates a drop handler for inserting the given cells.
*/
createVertexTemplateEntry(style: string, width: number, height: number, value?: string, title?: string, showLabel?: boolean, showTitle?: boolean, tags?: string): any;
/**
* Creates a drop handler for inserting the given cells.
*/
createVertexTemplate(style: string, width: number, height: number, value?: string, title?: string, showLabel?: boolean, showTitle?: boolean, allowCellsInserted?: boolean): any;
/**
* Creates a drop handle for inserting the given cells.
*/
createVertexTemplateFromData(data: string, width: number, height: number, title: string, showLabel?: boolean, showTitle?: boolean, allowCellsInserted?: boolean): any;
/**
* Creates a drop handler for inserting the given cells.
*/
createVertexTemplateFromCells(cells: mxCell, width: number, height: number, title?: string, showLabel?: boolean, showTitle?: boolean, allowCellsInserted?: boolean): any;
/**
*
*/
createEdgeTemplateEntry(style: string, width: number, height: number, value?: string, title?: string, showLabel?: boolean, tags?: any, allowCellsInserted?: boolean): any;
/**
* Creates a drop handler for inserting the given cells.
*/
createEdgeTemplate(style: string, width: number, height: number, value?: string, title?: string, showLabel?: boolean, allowCellsInserted?: boolean): any;
/**
* Creates a drop handler for inserting the given cells.
*/
createEdgeTemplateFromCells(cells: mxCell, width: number, height: number, title?: string, showLabel?: boolean, allowCellsInserted?: boolean): any;
/**
* Adds the given palette.
*/
addPaletteFunctions(id: string, title: string, expanded?: boolean, fns?: any): void;
/**
* Adds the given palette.
*/
addPalette(id: string, title: string, expanded?: boolean, onInit?: any): HTMLElement;
/**
* Create the given title element.
*/
addFoldingHandler(title: string, content: any, funct: any): any;
/**
* Removes the palette for the given ID.
*/
removePalette(id: any): boolean;
/**
* Adds the given image palette.
*/
addImagePalette(id: string, title: string, prefix: string, postfix: string, items?: Array, titles?: any, tags?: any): void;
/**
* Creates the array of tags for the given stencil. Duplicates are allowed and wil be filtered out later.
*/
getTagsForStencil(packageName: string, stencilName: string, moreTags?: string): string;
/**
* Adds the given stencil palette.
*/
addStencilPalette(id: string, title: string, stencilFile: string, stye: string, ignore?: boolean, onInit?: boolean, scale?: boolean, tags?: any, customFns?: any): void;
/**
* Adds the given stencil palette
*/
destroy();
}
/**
* Toolbar
*/
export class Toolbar{
/**
* Image for the dropdown arrow.
*/
dropdownImage: string;
/**
* Image element for the dropdown arrow.
*/
dropdownImageHtml: string;
/**
* Defines the background for selected buttons.
*/
selectedBackground: string;
/**
* Defines the background for selected buttons.
*/
unselectedBackground: string;
/**
* Array that contains the DOM nodes that should never be removed.
*/
staticElements: boolean;
/**
* Adds the toolbar elements.
*/
init(): void;
/**
* Adds the toolbar elements.
*/
addDropDownArrow(menu: HTMLElement, sprite: string, width: number, atlasWidth?: number, left?: number, top?: number, atlasLeft?: number): void;
/**
* Sets the current font name.
*/
setFontName(value: string): void;
/**
* Sets the current font name.
*/
setFontSize(value: string): void;
/**
* Hides the current Menu.
*/
createTextToolbar(): void;
/**
* Hides the current menu.
*/
hideMenu(): void;
/**
* Adds a lable to the toolbar.
*/
addMenu(label: string, tooltip: string, showLabels: boolean, name?: string, c?: boolean, showAll?: boolean, ignoreState?: boolean): any;
/**
* Adds a label to the toolbar.
*/
addMenuFunction(label: string, tooltip: string, showLabels: boolean, funct: any, c: boolean, showAll: boolean): any;
/**
* Adds a label to the toolbar.
*/
addMenuFunctionInContainer(container: any, label: string, tooltip: string, showLabels: boolean, funct: any, showAll: boolean): any;
/**
* Adds a separator to the separator.
*/
addSperator(c?: any): any;
/**
* Adds given action item
*/
addItems(keys: Array, c?: any, ignoreDisabled?: boolean): any;
/**
* Adds a button to the toolbar.
*/
addButton(classname: string, tooltip?: any, funct?: any, c?: boolean): any;
/**
* Initialized the given toolbar element.
*/
initElement(elt: any, tooltip: string): void;
/**
* Adds enabled state with setter to DOM node (avaoids JS wrapper).
*/
addEnabledState(elt: any): void;
/**
* Adds enabled state with setter to DOM node (avoids JS wrapper).
*/
addClickHandler(elt: any, funct: any): void;
/**
* Creates and returns a new button.
*/
createButton(classname: string): any;
/**
* Creates and returns a new button.
*/
createLabel(label: string, tooltip?: boolean): any;
/**
* Adds a handler for showing a menu in the given element.
*/
addMenuHandler(elt: any, showLabels?: string, funct?: any, showAll?: any): void;
/**
* Adds a handler for showing a menu in the given element.
*/
destroy(): void;
}
/**
* @class mxEvent
*
* Cross-browser DOM event support. For internal event handling,
* {@link mxEventSource} and the graph event dispatch loop in {@link mxGraph} are used.
*
* ### Memory Leaks:
*
* Use this class for adding and removing listeners to/from DOM nodes. The
* {@link removeAllListeners} function is provided to remove all listeners that
* have been added using {@link addListener}. The function should be invoked when
* the last reference is removed in the JavaScript code, typically when the
* referenced DOM node is removed from the DOM.
*/
declare class mxEvent {
/**
* Binds the function to the specified event on the given element. Use
* {@link mxUtils.bind} in order to bind the "this" keyword inside the function
* to a given execution scope.
*/
static addListener(element: Node | Window, eventName: string, funct: Function): void;
/**
* Removes the specified listener from the given element.
*/
static removeListener(element: Node | Window, eventName: string, funct: Function): void;
/**
* Removes all listeners from the given element.
*/
static removeAllListeners(element: Node | Window): void;
/**
* Adds the given listeners for touch, mouse and/or pointer events. If
* {@link mxClient.IS_POINTER} is true then pointer events will be registered,
* else the respective mouse events will be registered. If {@link mxClient.IS_POINTER}
* is false and {@link mxClient.IS_TOUCH} is true then the respective touch events
* will be registered as well as the mouse events.
*/
static addGestureListeners(node: Node | Window, startListener: Function, moveListener?: Function, endListener?: Function): void;
/**
* Removes the given listeners from mousedown, mousemove, mouseup and the
* respective touch events if {@link mxClient.IS_TOUCH} is true.
*/
static removeGestureListeners(node: Node | Window, startListener: Function, moveListener?: Function, endListener?: Function): void;
/**
* Redirects the mouse events from the given DOM node to the graph dispatch
* loop using the event and given state as event arguments. State can
* either be an instance of {@link mxCellState} or a function that returns an
* {@link mxCellState}. The down, move, up and dblClick arguments are optional
* functions that take the trigger event as arguments and replace the
* default behaviour.
*/
static redirectMouseEvents(node: Node | Window, graph: mxGraph,
state: ((event: Event) => mxCellState) | mxCellState,
down?: Function, move?: Function, up?: Function, dblClick?: Function): void;
/**
* Removes the known listeners from the given DOM node and its descendants.
*
* @param element DOM node to remove the listeners from.
*/
static release(element: Node | Window): void;
/**
* Installs the given function as a handler for mouse wheel events. The
* function has two arguments: the mouse event and a boolean that specifies
* if the wheel was moved up or down.
*
* This has been tested with IE 6 and 7, Firefox (all versions), Opera and
* Safari. It does currently not work on Safari for Mac.
*
* ### Example
*
* @example
* ```javascript
* mxEvent.addMouseWheelListener(function (evt, up)
* {
* mxLog.show();
* mxLog.debug('mouseWheel: up='+up);
* });
* ```
*
* @param funct Handler function that takes the event argument and a boolean up
* argument for the mousewheel direction.
* @param target Target for installing the listener in Google Chrome. See
* https://www.chromestatus.com/features/6662647093133312.
*/
static addMouseWheelListener(funct: (event: Event, up: boolean) => void, target?: Node | Window): void;
/**
* Disables the context menu for the given element.
*/
static disableContextMenu(element: Node): void;
/**
* Returns the event's target or srcElement depending on the browser.
*/
static getSource(evt: Event): T;
/**
* Returns true if the event has been consumed using {@link consume}.
*/
static isConsumed(evt: mxEventObject | mxMouseEvent | Event): boolean;
/**
* Returns true if the event was generated using a touch device (not a pen or mouse).
*/
static isTouchEvent(evt: Event): boolean;
/**
* Returns true if the event was generated using a pen (not a touch device or mouse).
*/
static isPenEvent(evt: Event): boolean;
/**
* Returns true if the event was generated using a touch device (not a pen or mouse).
*/
static isMultiTouchEvent(evt: Event): boolean;
/**
* Returns true if the event was generated using a mouse (not a pen or touch device).
*/
static isMouseEvent(evt: Event): boolean;
/**
* Returns true if the left mouse button is pressed for the given event.
* To check if a button is pressed during a mouseMove you should use the
* {@link mxGraph.isMouseDown} property. Note that this returns true in Firefox
* for control+left-click on the Mac.
*/
static isLeftMouseButton(evt: MouseEvent): boolean;
/**
* Returns true if the middle mouse button is pressed for the given event.
* To check if a button is pressed during a mouseMove you should use the
* {@link mxGraph.isMouseDown} property.
*/
static isMiddleMouseButton(evt: MouseEvent): boolean;
/**
* Returns true if the right mouse button was pressed. Note that this
* button might not be available on some systems. For handling a popup
* trigger {@link isPopupTrigger} should be used.
*/
static isRightMouseButton(evt: MouseEvent): boolean;
/**
* Returns true if the event is a popup trigger. This implementation
* returns true if the right button or the left button and control was
* pressed on a Mac.
*/
static isPopupTrigger(evt: Event): boolean;
/**
* Returns true if the shift key is pressed for the given event.
*/
static isShiftDown(evt: MouseEvent): boolean;
/**
* Returns true if the alt key is pressed for the given event.
*/
static isAltDown(evt: MouseEvent): boolean;
/**
* Returns true if the control key is pressed for the given event.
*/
static isControlDown(evt: MouseEvent): boolean;
/**
* Returns true if the meta key is pressed for the given event.
*/
static isMetaDown(evt: MouseEvent): boolean;
/**
* Returns the touch or mouse event that contains the mouse coordinates.
*/
static getMainEvent(e: TouchEvent): Touch;
static getMainEvent(e: MouseEvent): MouseEvent;
/**
* Returns true if the meta key is pressed for the given event.
*/
static getClientX(e: TouchEvent | MouseEvent): number
/**
* Returns true if the meta key is pressed for the given event.
*/
static getClientY(e: TouchEvent | MouseEvent): number;
/**
* Consumes the given event.
*
* @param evt Native event to be consumed.
* @param preventDefault Optional boolean to prevent the default for the event.
* Default is true.
* @param stopPropagation Option boolean to stop event propagation. Default is
* true.
*/
static consume(evt: Event, preventDefault?: boolean, stopPropagation?: boolean): void;
/**
* Index for the label handle in an mxMouseEvent. This should be a negative
* value that does not interfere with any possible handle indices.
* @default -1
*/
static LABEL_HANDLE: -1;
/**
* Index for the rotation handle in an mxMouseEvent. This should be a
* negative value that does not interfere with any possible handle indices.
* @default -2
*/
static ROTATION_HANDLE: -2;
/**
* Start index for the custom handles in an mxMouseEvent. This should be a
* negative value and is the start index which is decremented for each
* custom handle.
* @default -100
*/
static CUSTOM_HANDLE: -100;
/**
* Start index for the virtual handles in an mxMouseEvent. This should be a
* negative value and is the start index which is decremented for each
* virtual handle.
* This assumes that there are no more
* than VIRTUAL_HANDLE - CUSTOM_HANDLE custom handles.
*
* @default -100000
*/
static VIRTUAL_HANDLE: -100000;
//
// Event names
//
/**
* Specifies the event name for mouseDown.
*/
static MOUSE_DOWN: 'mouseDown';
/**
* Specifies the event name for mouseMove.
*/
static MOUSE_MOVE: 'mouseMove';
/**
* Specifies the event name for mouseUp.
*/
static MOUSE_UP: 'mouseUp';
/**
* Specifies the event name for activate.
*/
static ACTIVATE: 'activate';
/**
* Specifies the event name for resizeStart.
*/
static RESIZE_START: 'resizeStart';
/**
* Specifies the event name for resize.
*/
static RESIZE: 'resize';
/**
* Specifies the event name for resizeEnd.
*/
static RESIZE_END: 'resizeEnd';
/**
* Specifies the event name for moveStart.
*/
static MOVE_START: 'moveStart';
/**
* Specifies the event name for move.
*/
static MOVE: 'move';
/**
* Specifies the event name for moveEnd.
*/
static MOVE_END: 'moveEnd';
/**
* Specifies the event name for panStart.
*/
static PAN_START: 'panStart';
/**
* Specifies the event name for pan.
*/
static PAN: 'pan';
/**
* Specifies the event name for panEnd.
*/
static PAN_END: 'panEnd';
/**
* Specifies the event name for minimize.
*/
static MINIMIZE: 'minimize';
/**
* Specifies the event name for normalize.
*/
static NORMALIZE: 'normalize';
/**
* Specifies the event name for maximize.
*/
static MAXIMIZE: 'maximize';
/**
* Specifies the event name for hide.
*/
static HIDE: 'hide';
/**
* Specifies the event name for show.
*/
static SHOW: 'show';
/**
* Specifies the event name for close.
*/
static CLOSE: 'close';
/**
* Specifies the event name for destroy.
*/
static DESTROY: 'destroy';
/**
* Specifies the event name for refresh.
*/
static REFRESH: 'refresh';
/**
* Specifies the event name for size.
*/
static SIZE: 'size';
/**
* Specifies the event name for select.
*/
static SELECT: 'select';
/**
* Specifies the event name for fired.
*/
static FIRED: 'fired';
/**
* Specifies the event name for fireMouseEvent.
*/
static FIRE_MOUSE_EVENT: 'fireMouseEvent';
/**
* Specifies the event name for gesture.
*/
static GESTURE: 'gesture';
/**
* Specifies the event name for tapAndHold.
*/
static TAP_AND_HOLD: 'tapAndHold';
/**
* Specifies the event name for get.
*/
static GET: 'get';
/**
* Specifies the event name for receive.
*/
static RECEIVE: 'receive';
/**
* Specifies the event name for connect.
*/
static CONNECT: 'connect';
/**
* Specifies the event name for disconnect.
*/
static DISCONNECT: 'disconnect';
/**
* Specifies the event name for suspend.
*/
static SUSPEND: 'suspend';
/**
* Specifies the event name for suspend.
*/
static RESUME: 'resume';
/**
* Specifies the event name for mark.
*/
static MARK: 'mark';
/**
* Specifies the event name for root.
*/
static ROOT: 'root';
/**
* Specifies the event name for post.
*/
static POST: 'post';
/**
* Specifies the event name for open.
*/
static OPEN: 'open';
/**
* Specifies the event name for open.
*/
static SAVE: 'save';
/**
* Specifies the event name for beforeAddVertex.
*/
static BEFORE_ADD_VERTEX: 'beforeAddVertex';
/**
* Specifies the event name for addVertex.
*/
static ADD_VERTEX: 'addVertex';
/**
* Specifies the event name for afterAddVertex.
*/
static AFTER_ADD_VERTEX: 'afterAddVertex';
/**
* Specifies the event name for done.
*/
static DONE: 'done';
/**
* Specifies the event name for execute.
*/
static EXECUTE: 'execute';
/**
* Specifies the event name for executed.
*/
static EXECUTED: 'executed';
/**
* Specifies the event name for beginUpdate.
*/
static BEGIN_UPDATE: 'beginUpdate';
/**
* Specifies the event name for startEdit.
*/
static START_EDIT: 'startEdit';
/**
* Specifies the event name for endUpdate.
*/
static END_UPDATE: 'endUpdate';
/**
* Specifies the event name for endEdit.
*/
static END_EDIT: 'endEdit';
/**
* Specifies the event name for beforeUndo.
*/
static BEFORE_UNDO: 'beforeUndo';
/**
* Specifies the event name for undo.
*/
static UNDO: 'undo';
/**
* Specifies the event name for redo.
*/
static REDO: 'redo';
/**
* Specifies the event name for change.
*/
static CHANGE: 'change';
/**
* Specifies the event name for notify.
*/
static NOTIFY: 'notify';
/**
* Specifies the event name for layoutCells.
*/
static LAYOUT_CELLS: 'layoutCells';
/**
* Specifies the event name for click.
*/
static CLICK: 'click';
/**
* Specifies the event name for scale.
*/
static SCALE: 'scale';
/**
* Specifies the event name for translate.
*/
static TRANSLATE: 'translate';
/**
* Specifies the event name for scaleAndTranslate.
*/
static SCALE_AND_TRANSLATE: 'scaleAndTranslate';
/**
* Specifies the event name for up.
*/
static UP: 'up';
/**
* Specifies the event name for down.
*/
static DOWN: 'down';
/**
* Specifies the event name for add.
*/
static ADD: 'add';
/**
* Specifies the event name for remove.
*/
static REMOVE: 'remove';
/**
* Specifies the event name for clear.
*/
static CLEAR: 'clear';
/**
* Specifies the event name for addCells.
*/
static ADD_CELLS: 'addCells';
/**
* Specifies the event name for cellsAdded.
*/
static CELLS_ADDED: 'cellsAdded';
/**
* Specifies the event name for moveCells.
*/
static MOVE_CELLS: 'moveCells';
/**
* Specifies the event name for cellsMoved.
*/
static CELLS_MOVED: 'cellsMoved';
/**
* Specifies the event name for resizeCells.
*/
static RESIZE_CELLS: 'resizeCells';
/**
* Specifies the event name for cellsResized.
*/
static CELLS_RESIZED: 'cellsResized';
/**
* Specifies the event name for toggleCells.
*/
static TOGGLE_CELLS: 'toggleCells';
/**
* Specifies the event name for cellsToggled.
*/
static CELLS_TOGGLED: 'cellsToggled';
/**
* Specifies the event name for orderCells.
*/
static ORDER_CELLS: 'orderCells';
/**
* Specifies the event name for cellsOrdered.
*/
static CELLS_ORDERED: 'cellsOrdered';
/**
* Specifies the event name for removeCells.
*/
static REMOVE_CELLS: 'removeCells';
/**
* Specifies the event name for cellsRemoved.
*/
static CELLS_REMOVED: 'cellsRemoved';
/**
* Specifies the event name for groupCells.
*/
static GROUP_CELLS: 'groupCells';
/**
* Specifies the event name for ungroupCells.
*/
static UNGROUP_CELLS: 'ungroupCells';
/**
* Specifies the event name for removeCellsFromParent.
*/
static REMOVE_CELLS_FROM_PARENT: 'removeCellsFromParent';
/**
* Specifies the event name for foldCells.
*/
static FOLD_CELLS: 'foldCells';
/**
* Specifies the event name for cellsFolded.
*/
static CELLS_FOLDED: 'cellsFolded';
/**
* Specifies the event name for alignCells.
*/
static ALIGN_CELLS: 'alignCells';
/**
* Specifies the event name for labelChanged.
*/
static LABEL_CHANGED: 'labelChanged';
/**
* Specifies the event name for connectCell.
*/
static CONNECT_CELL: 'connectCell';
/**
* Specifies the event name for cellConnected.
*/
static CELL_CONNECTED: 'cellConnected';
/**
* Specifies the event name for splitEdge.
*/
static SPLIT_EDGE: 'splitEdge';
/**
* Specifies the event name for flipEdge.
*/
static FLIP_EDGE: 'flipEdge';
/**
* Specifies the event name for startEditing.
*/
static START_EDITING: 'startEditing';
/**
* Specifies the event name for editingStarted.
*/
static EDITING_STARTED: 'editingStarted';
/**
* Specifies the event name for editingStopped.
*/
static EDITING_STOPPED: 'editingStopped';
/**
* Specifies the event name for addOverlay.
*/
static ADD_OVERLAY: 'addOverlay';
/**
* Specifies the event name for removeOverlay.
*/
static REMOVE_OVERLAY: 'removeOverlay';
/**
* Specifies the event name for updateCellSize.
*/
static UPDATE_CELL_SIZE: 'updateCellSize';
/**
* Specifies the event name for escape.
*/
static ESCAPE: 'escape';
/**
* Specifies the event name for doubleClick.
*/
static DOUBLE_CLICK: 'doubleClick';
/**
* Specifies the event name for start.
*/
static START: 'start';
/**
* Specifies the event name for reset.
*/
static RESET: 'reset';
}
/**
* @class mxConstants
*/
declare class mxConstants {
/**
* Defines the portion of the cell which is to be used as a connectable
* region. Default is 0.3. Possible values are 0 < x <= 1.
* @default 0.3
*/
static DEFAULT_HOTSPOT: number;
/**
* Defines the minimum size in pixels of the portion of the cell which is
* to be used as a connectable region. Default is 8.
* @default 8
*/
static MIN_HOTSPOT_SIZE: number;
/**
* Defines the maximum size in pixels of the portion of the cell which is
* to be used as a connectable region. Use 0 for no maximum. Default is 0.
* @default 0
*/
static MAX_HOTSPOT_SIZE: number;
/**
* Defines the exact rendering hint.
*/
static RENDERING_HINT_EXACT: 'exact';
/**
* Defines the faster rendering hint.
*/
static RENDERING_HINT_FASTER: 'faster';
/**
* Defines the fastest rendering hint.
*/
static RENDERING_HINT_FASTEST: 'fastest';
/**
* Defines the SVG display dialect name.
*/
static DIALECT_SVG: 'svg';
/**
* Defines the VML display dialect name.
*/
static DIALECT_VML: 'vml';
/**
* Defines the mixed HTML display dialect name.
*/
static DIALECT_MIXEDHTML: 'mixedHtml';
/**
* Defines the preferred HTML display dialect name.
*/
static DIALECT_PREFERHTML: 'preferHtml';
/**
* Defines the strict HTML display dialect.
*/
static DIALECT_STRICTHTML: 'strictHtml';
/**
* Defines the SVG namespace.
*/
static NS_SVG: 'http://www.w3.org/2000/svg';
/**
* Defines the XHTML namespace.
*/
static NS_XHTML: 'http://www.w3.org/1999/xhtml';
/**
* Defines the XLink namespace.
*/
static NS_XLINK: 'http://www.w3.org/1999/xlink';
/**
* Defines the color to be used to draw shadows in shapes and windows.
* @default gray
*/
static SHADOWCOLOR: string;
/**
* Used for shadow color in filters where transparency is not supported
* (Microsoft Internet Explorer). Default is gray.
*
* @default gray
*/
static VML_SHADOWCOLOR: string;
/**
* Specifies the x-offset of the shadow. Default is 2.
* @default 2
*/
static SHADOW_OFFSET_X: number;
/**
* Specifies the y-offset of the shadow. Default is 3.
* @default 3
*/
static SHADOW_OFFSET_Y: number;
/**
* Defines the opacity for shadows. Default is 1.
* @default 1
*/
static SHADOW_OPACITY: number;
/**
* DOM node of type ELEMENT.
* @default 1
*/
static NODETYPE_ELEMENT: 1;
/**
* DOM node of type ATTRIBUTE.
* @default 2
*/
static NODETYPE_ATTRIBUTE: number;
/**
* DOM node of type TEXT.
* @default 3
*/
static NODETYPE_TEXT: number;
/**
* DOM node of type CDATA.
* @default 4
*/
static NODETYPE_CDATA: number;
/**
* DOM node of type ENTITY_REFERENCE.
* @default 5
*/
static NODETYPE_ENTITY_REFERENCE: number;
/**
* DOM node of type ENTITY.
* @default 6
*/
static NODETYPE_ENTITY: number;
/**
* DOM node of type PROCESSING_INSTRUCTION.
* @default 7
*/
static NODETYPE_PROCESSING_INSTRUCTION: number;
/**
* DOM node of type COMMENT.
* @default 8
*/
static NODETYPE_COMMENT: number;
/**
* DOM node of type DOCUMENT.
* @default 9
*/
static NODETYPE_DOCUMENT: number;
/**
* DOM node of type DOCUMENTTYPE.
* @default 10
*/
static NODETYPE_DOCUMENTTYPE: number;
/**
* DOM node of type DOCUMENT_FRAGMENT.
* @default 11
*/
static NODETYPE_DOCUMENT_FRAGMENT: number;
/**
* DOM node of type NOTATION.
* @default 12
*/
static NODETYPE_NOTATION: number;
/**
* Defines the vertical offset for the tooltip.
* Default is 16.
* @default 16
*/
static TOOLTIP_VERTICAL_OFFSET: number;
/**
* Specifies the default valid color. Default is #0000FF.
* @default #00FF00
*/
static DEFAULT_VALID_COLOR: string;
/**
* Specifies the default invalid color. Default is #FF0000.
* @default #FF0000
*/
static DEFAULT_INVALID_COLOR: string;
/**
* Specifies the default highlight color for shape outlines.
* Default is #0000FF. This is used in .
* @default #00FF00
*/
static OUTLINE_HIGHLIGHT_COLOR: string;
/**
* Defines the strokewidth to be used for shape outlines.
* Default is 5. This is used in .
* @default 5
*/
static OUTLINE_HIGHLIGHT_STROKEWIDTH: number;
/**
* Defines the strokewidth to be used for the highlights.
* Default is 3.
* @default 3
*/
static HIGHLIGHT_STROKEWIDTH: number;
/**
* Size of the constraint highlight (in px). Default is 2.
* @default 2
*/
static HIGHLIGHT_SIZE: number;
/**
* Opacity (in %) used for the highlights (including outline).
* Default is 100.
* @default 100
*/
static HIGHLIGHT_OPACITY: number;
/**
* Defines the cursor for a movable vertex. Default is 'move'.
*/
static CURSOR_MOVABLE_VERTEX: 'move';
/**
* Defines the cursor for a movable edge. Default is 'move'.
*/
static CURSOR_MOVABLE_EDGE: 'move';
/**
* Defines the cursor for a movable label. Default is 'default'.
*/
static CURSOR_LABEL_HANDLE: 'default';
/**
* Defines the cursor for a terminal handle. Default is 'pointer'.
*/
static CURSOR_TERMINAL_HANDLE: 'pointer';
/**
* Defines the cursor for a movable bend. Default is 'crosshair'.
*/
static CURSOR_BEND_HANDLE: 'crosshair';
/**
* Defines the cursor for a movable bend. Default is 'crosshair'.
*/
static CURSOR_VIRTUAL_BEND_HANDLE: 'crosshair';
/**
* Defines the cursor for a connectable state. Default is 'pointer'.
*/
static CURSOR_CONNECT: 'pointer';
/**
* Defines the color to be used for the cell highlighting.
* Use 'none' for no color. Default is #00FF00.
* @default #00FF00
*/
static HIGHLIGHT_COLOR: string;
/**
* Defines the color to be used for highlighting a target cell for a new
* or changed connection. Note that this may be either a source or
* target terminal in the graph. Use 'none' for no color.
* Default is #0000FF.
* @default #0000FF
*/
static CONNECT_TARGET_COLOR: string;
/**
* Defines the color to be used for highlighting a invalid target cells
* for a new or changed connections. Note that this may be either a source
* or target terminal in the graph. Use 'none' for no color. Default is
* #FF0000.
* @default #FF0000
*/
static INVALID_CONNECT_TARGET_COLOR: string;
/**
* Defines the color to be used for the highlighting target parent cells
* (for drag and drop). Use 'none' for no color. Default is #0000FF.
* @default #0000FF
*/
static DROP_TARGET_COLOR: string;
/**
* Defines the color to be used for the coloring valid connection
* previews. Use 'none' for no color. Default is #FF0000.
* @default #00FF00
*/
static VALID_COLOR: string;
/**
* Defines the color to be used for the coloring invalid connection
* previews. Use 'none' for no color. Default is #FF0000.
* @default #FF0000
*/
static INVALID_COLOR: string;
/**
* Defines the color to be used for the selection border of edges. Use
* 'none' for no color. Default is #00FF00.
* @default #00FF00
*/
static EDGE_SELECTION_COLOR: string;
/**
* Defines the color to be used for the selection border of vertices. Use
* 'none' for no color. Default is #00FF00.
* @default #00FF00
*/
static VERTEX_SELECTION_COLOR: string;
/**
* Defines the strokewidth to be used for vertex selections.
* Default is 1.
* @default 1
*/
static VERTEX_SELECTION_STROKEWIDTH: number;
/**
* Defines the strokewidth to be used for edge selections.
* Default is 1.
* @default 1
*/
static EDGE_SELECTION_STROKEWIDTH: number;
/**
* Defines the dashed state to be used for the vertex selection
* border. Default is true.
*/
static VERTEX_SELECTION_DASHED: true;
/**
* Defines the dashed state to be used for the edge selection
* border. Default is true.
*/
static EDGE_SELECTION_DASHED: true;
/**
* Defines the color to be used for the guidelines in mxGraphHandler.
* Default is #FF0000.
* @default #FF0000
*/
static GUIDE_COLOR: string;
/**
* Defines the strokewidth to be used for the guidelines in mxGraphHandler.
* Default is 1.
* @default 1
*/
static GUIDE_STROKEWIDTH: number;
/**
* Defines the color to be used for the outline rectangle
* border. Use 'none' for no color. Default is #0099FF.
* @default #0099FF
*/
static OUTLINE_COLOR: string;
/**
* Defines the strokewidth to be used for the outline rectangle
* stroke width. Default is 3.
*/
static OUTLINE_STROKEWIDTH: number;
/**
* Defines the default size for handles. Default is 6.
* @default 6
*/
static HANDLE_SIZE: number;
/**
* Defines the default size for label handles. Default is 4.
* @default 4
*/
static LABEL_HANDLE_SIZE: number;
/**
* Defines the color to be used for the handle fill color. Use 'none' for
* no color. Default is #00FF00 (green).
* @default #00FF00
*/
static HANDLE_FILLCOLOR: string;
/**
* Defines the color to be used for the handle stroke color. Use 'none' for
* no color. Default is black.
*/
static HANDLE_STROKECOLOR: 'black';
/**
* Defines the color to be used for the label handle fill color. Use 'none'
* for no color. Default is yellow.
*/
static LABEL_HANDLE_FILLCOLOR: 'yellow';
/**
* Defines the color to be used for the connect handle fill color. Use
* 'none' for no color. Default is #0000FF (blue).
* @default #0000FF
*/
static CONNECT_HANDLE_FILLCOLOR: string;
/**
* Defines the color to be used for the locked handle fill color. Use
* 'none' for no color. Default is #FF0000 (red).
* @default #FF0000
*/
static LOCKED_HANDLE_FILLCOLOR: string;
/**
* Defines the color to be used for the outline sizer fill color. Use
* 'none' for no color. Default is #00FFFF.
* @default #00FFFF
*/
static OUTLINE_HANDLE_FILLCOLOR: string;
/**
* Defines the color to be used for the outline sizer stroke color. Use
* 'none' for no color. Default is #0033FF.
* @default #0033FF
*/
static OUTLINE_HANDLE_STROKECOLOR: string;
/**
* Defines the default family for all fonts. Default is Arial,Helvetica.
* @default 'Arial,Helvetica'
*/
static DEFAULT_FONTFAMILY: string;
/**
* Defines the default size (in px). Default is 11.
* @default 11
*/
static DEFAULT_FONTSIZE: number;
/**
* Defines the default value for the if no value is
* defined for it in the style. Default value is an empty string which means
* the default system setting is used and no direction is set.
*/
static DEFAULT_TEXT_DIRECTION: '';
/**
* Defines the default line height for text labels. Default is 1.2.
* @default 1.2
*/
static LINE_HEIGHT: number;
/**
* Defines the CSS value for the word-wrap property. Default is "normal".
* Change this to "break-word" to allow long words to be able to be broken
* and wrap onto the next line.
*/
static WORD_WRAP: 'normal';
/**
* Specifies if absolute line heights should be used (px) in CSS. Default
* is false. Set this to true for backwards compatibility.
*/
static ABSOLUTE_LINE_HEIGHT: false;
/**
* Defines the default style for all fonts. Default is 0. This can be set
* to any combination of font styles as follows.
*
* (code)
* mxConstants.DEFAULT_FONTSTYLE = mxConstants.FONT_BOLD | mxConstants.FONT_ITALIC;
* (end)
* @default 0
*/
static DEFAULT_FONTSTYLE: number;
/**
* Defines the default start size for swimlanes. Default is 40.
* @default 40
*/
static DEFAULT_STARTSIZE: number;
/**
* Defines the default size for all markers. Default is 6.
* @default 6
*/
static DEFAULT_MARKERSIZE: number;
/**
* Defines the default width and height for images used in the
* label shape. Default is 24.
* @default 24
*/
static DEFAULT_IMAGESIZE: number;
/**
* Defines the length of the horizontal segment of an Entity Relation.
* This can be overridden using style.
* Default is 30.
*/
static ENTITY_SEGMENT: number;
/**
* Defines the rounding factor for rounded rectangles in percent between
* 0 and 1. Values should be smaller than 0.5. Default is 0.15.
* @default 0.15
*/
static RECTANGLE_ROUNDING_FACTOR: number;
/**
* Defines the size of the arcs for rounded edges. Default is 20.
* @default 20
*/
static LINE_ARCSIZE: number;
/**
* Defines the spacing between the arrow shape and its terminals. Default is 0.
* @default 0
*/
static ARROW_SPACING: number;
/**
* Defines the width of the arrow shape. Default is 30.
* @default 30
*/
static ARROW_WIDTH: number;
/**
* Defines the size of the arrowhead in the arrow shape. Default is 30.
* @default 30
*/
static ARROW_SIZE: number;
/**
* Defines the rectangle for the A4 portrait page format. The dimensions
* of this page format are 826x1169 pixels.
*/
static PAGE_FORMAT_A4_PORTRAIT: mxRectangle;
/**
* Defines the rectangle for the A4 portrait page format. The dimensions
* of this page format are 826x1169 pixels.
*/
static PAGE_FORMAT_A4_LANDSCAPE: mxRectangle;
/**
* Defines the rectangle for the Letter portrait page format. The
* dimensions of this page format are 850x1100 pixels.
*/
static PAGE_FORMAT_LETTER_PORTRAIT: mxRectangle;
/**
* Defines the rectangle for the Letter portrait page format. The dimensions
* of this page format are 850x1100 pixels.
*/
static PAGE_FORMAT_LETTER_LANDSCAPE: mxRectangle;
/**
* Defines the value for none. Default is "none".
*/
static NONE: 'none';
/**
* Defines the key for the perimeter style. This is a function that defines
* the perimeter around a particular shape. Possible values are the
* functions defined in . Alternatively, the constants in this
* class that start with "PERIMETER_" may be used to access
* perimeter styles in . Value is "perimeter".
*/
static STYLE_PERIMETER: 'perimeter';
/**
* Defines the ID of the cell that should be used for computing the
* perimeter point of the source for an edge. This allows for graphically
* connecting to a cell while keeping the actual terminal of the edge.
* Value is "sourcePort".
*/
static STYLE_SOURCE_PORT: 'sourcePort';
/**
* Defines the ID of the cell that should be used for computing the
* perimeter point of the target for an edge. This allows for graphically
* connecting to a cell while keeping the actual terminal of the edge.
* Value is "targetPort".
*/
static STYLE_TARGET_PORT: 'targetPort';
/**
* Defines the direction(s) that edges are allowed to connect to cells in.
* Possible values are "DIRECTION_NORTH, DIRECTION_SOUTH,
* DIRECTION_EAST" and "DIRECTION_WEST". Value is
* "portConstraint".
*/
static STYLE_PORT_CONSTRAINT: 'portConstraint';
/**
* Define whether port constraint directions are rotated with vertex
* rotation. 0 (default) causes port constraints to remain absolute,
* relative to the graph, 1 causes the constraints to rotate with
* the vertex. Value is "portConstraintRotation".
*/
static STYLE_PORT_CONSTRAINT_ROTATION: 'portConstraintRotation';
/**
* Defines the direction(s) that edges are allowed to connect to sources in.
* Possible values are "DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_EAST"
* and "DIRECTION_WEST". Value is "sourcePortConstraint".
*/
static STYLE_SOURCE_PORT_CONSTRAINT: 'sourcePortConstraint';
/**
* Defines the direction(s) that edges are allowed to connect to targets in.
* Possible values are "DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_EAST"
* and "DIRECTION_WEST". Value is "targetPortConstraint".
*/
static STYLE_TARGET_PORT_CONSTRAINT: 'targetPortConstraint';
/**
* Defines the key for the opacity style. The type of the value is
* numeric and the possible range is 0-100. Value is "opacity".
*/
static STYLE_OPACITY: 'opacity';
/**
* Defines the key for the fill opacity style. The type of the value is
* numeric and the possible range is 0-100. Value is "fillOpacity".
*/
static STYLE_FILL_OPACITY: 'fillOpacity';
/**
* Defines the key for the stroke opacity style. The type of the value is
* numeric and the possible range is 0-100. Value is "strokeOpacity".
*/
static STYLE_STROKE_OPACITY: 'strokeOpacity';
/**
* Defines the key for the text opacity style. The type of the value is
* numeric and the possible range is 0-100. Value is "textOpacity".
*/
static STYLE_TEXT_OPACITY: 'textOpacity';
/**
* Defines the key for the text direction style. Possible values are
* "TEXT_DIRECTION_DEFAULT, TEXT_DIRECTION_AUTO, TEXT_DIRECTION_LTR"
* and "TEXT_DIRECTION_RTL". Value is "textDirection".
* The default value for the style is defined in .
* It is used is no value is defined for this key in a given style. This is
* an experimental style that is currently ignored in the backends.
*/
static STYLE_TEXT_DIRECTION: 'textDirection';
/**
* Defines the key for the overflow style. Possible values are 'visible';
* 'hidden', 'fill' and 'width'. The default value is 'visible'. This value
* specifies how overlapping vertex labels are handled. A value of
* 'visible' will show the complete label. A value of 'hidden' will clip
* the label so that it does not overlap the vertex bounds. A value of
* 'fill' will use the vertex bounds and a value of 'width' will use the
* the vertex width for the label. See . Note that
* the vertical alignment is ignored for overflow fill and for horizontal
* alignment, left should be used to avoid pixel offsets in Internet Explorer
* 11 and earlier or if foreignObjects are disabled. Value is "overflow".
*/
static STYLE_OVERFLOW: 'overflow';
/**
* Defines if the connection points on either end of the edge should be
* computed so that the edge is vertical or horizontal if possible and
* if the point is not at a fixed location. Default is false. This is
* used in , which also returns true if the edgeStyle
* of the edge is an elbow or entity. Value is "orthogonal".
*/
static STYLE_ORTHOGONAL: 'orthogonal';
/**
* Defines the key for the horizontal relative coordinate connection point
* of an edge with its source terminal. Value is "exitX".
*/
static STYLE_EXIT_X: 'exitX';
/**
* Defines the key for the vertical relative coordinate connection point
* of an edge with its source terminal. Value is "exitY".
*/
static STYLE_EXIT_Y: 'exitY';
/**
* Defines if the perimeter should be used to find the exact entry point
* along the perimeter of the source. Possible values are 0 (false) and
* 1 (true). Default is 1 (true). Value is "exitPerimeter".
*/
static STYLE_EXIT_PERIMETER: 'exitPerimeter';
/**
* Defines the key for the horizontal relative coordinate connection point
* of an edge with its target terminal. Value is "entryX".
*/
static STYLE_ENTRY_X: 'entryX';
/**
* Defines the key for the vertical relative coordinate connection point
* of an edge with its target terminal. Value is "entryY".
*/
static STYLE_ENTRY_Y: 'entryY';
/**
* Defines if the perimeter should be used to find the exact entry point
* along the perimeter of the target. Possible values are 0 (false) and
* 1 (true). Default is 1 (true). Value is "entryPerimeter".
*/
static STYLE_ENTRY_PERIMETER: 'entryPerimeter';
/**
* Defines the key for the white-space style. Possible values are 'nowrap'
* and 'wrap'. The default value is 'nowrap'. This value specifies how
* white-space inside a HTML vertex label should be handled. A value of
* 'nowrap' means the text will never wrap to the next line until a
* linefeed is encountered. A value of 'wrap' means text will wrap when
* necessary. This style is only used for HTML labels.
* See . Value is "whiteSpace".
*/
static STYLE_WHITE_SPACE: 'whiteSpace';
/**
* Defines the key for the rotation style. The type of the value is
* numeric and the possible range is 0-360. Value is "rotation".
*/
static STYLE_ROTATION: 'rotation';
/**
* Defines the key for the fill color. Possible values are all HTML color
* names or HEX codes, as well as special keywords such as 'swimlane;
* 'inherit' or 'indicated' to use the color code of a related cell or the
* indicator shape. Value is "fillColor".
*/
static STYLE_FILLCOLOR: 'fillColor';
/**
* Specifies if pointer events should be fired on transparent backgrounds.
* This style is currently only supported in . Default
* is true. Value is "pointerEvents". This is typically set to
* false in groups where the transparent part should allow any underlying
* cells to be clickable.
*/
static STYLE_POINTER_EVENTS: 'pointerEvents';
/**
* Defines the key for the fill color of the swimlane background. Possible
* values are all HTML color names or HEX codes. Default is no background.
* Value is "swimlaneFillColor".
*/
static STYLE_SWIMLANE_FILLCOLOR: 'swimlaneFillColor';
/**
* Defines the key for the margin between the ellipses in the double ellipse shape.
* Possible values are all positive numbers. Value is "margin".
*/
static STYLE_MARGIN: 'margin';
/**
* Defines the key for the gradient color. Possible values are all HTML color
* names or HEX codes, as well as special keywords such as 'swimlane;
* 'inherit' or 'indicated' to use the color code of a related cell or the
* indicator shape. This is ignored if no fill color is defined. Value is
* "gradientColor".
*/
static STYLE_GRADIENTCOLOR: 'gradientColor';
/**
* Defines the key for the gradient direction. Possible values are
* , , and
* . Default is . Generally, and by
* default in mxGraph, gradient painting is done from the value of
* to the value of . Taking the
* example of , this means color at the
* bottom of paint pattern and at top, with a
* gradient in-between. Value is "gradientDirection".
*/
static STYLE_GRADIENT_DIRECTION: 'gradientDirection';
/**
* Defines the key for the strokeColor style. Possible values are all HTML
* color names or HEX codes, as well as special keywords such as 'swimlane;
* 'inherit', 'indicated' to use the color code of a related cell or the
* indicator shape or 'none' for no color. Value is "strokeColor".
*/
static STYLE_STROKECOLOR: 'strokeColor';
/**
* Defines the key for the separatorColor style. Possible values are all
* HTML color names or HEX codes. This style is only used for
* shapes. Value is "separatorColor".
*/
static STYLE_SEPARATORCOLOR: 'separatorColor';
/**
* Defines the key for the strokeWidth style. The type of the value is
* numeric and the possible range is any non-negative value larger or equal
* to 1. The value defines the stroke width in pixels. Note: To hide a
* stroke use strokeColor none. Value is "strokeWidth".
*/
static STYLE_STROKEWIDTH: 'strokeWidth';
/**
* Defines the key for the align style. Possible values are ;
* and . This value defines how the lines of
* the label are horizontally aligned. mean label text lines
* are aligned to left of the label bounds, to the right of
* the label bounds and means the center of the text lines
* are aligned in the center of the label bounds. Note this value doesn't
* affect the positioning of the overall label bounds relative to the
* vertex, to move the label bounds horizontally, use
* . Value is "align".
*/
static STYLE_ALIGN: 'align';
/**
* Defines the key for the verticalAlign style. Possible values are
* , and . This value defines how
* the lines of the label are vertically aligned. means the
* topmost label text line is aligned against the top of the label bounds;
* means the bottom-most label text line is aligned against
* the bottom of the label bounds and means there is equal
* spacing between the topmost text label line and the top of the label
* bounds and the bottom-most text label line and the bottom of the label
* bounds. Note this value doesn't affect the positioning of the overall
* label bounds relative to the vertex, to move the label bounds
* vertically, use . Value is "verticalAlign".
*/
static STYLE_VERTICAL_ALIGN: 'verticalAlign';
/**
* Defines the key for the width of the label if the label position is not
* center. Value is "labelWidth".
*/
static STYLE_LABEL_WIDTH: 'labelWidth';
/**
* Defines the key for the horizontal label position of vertices. Possible
* values are , and . Default is
* . The label align defines the position of the label
* relative to the cell. means the entire label bounds is
* placed completely just to the left of the vertex, means
* adjust to the right and means the label bounds are
* vertically aligned with the bounds of the vertex. Note this value
* doesn't affect the positioning of label within the label bounds, to move
* the label horizontally within the label bounds, use .
* Value is "labelPosition".
*/
static STYLE_LABEL_POSITION: 'labelPosition';
/**
* Defines the key for the vertical label position of vertices. Possible
* values are , and . Default is
* . The label align defines the position of the label
* relative to the cell. means the entire label bounds is
* placed completely just on the top of the vertex, means
* adjust on the bottom and means the label bounds are
* horizontally aligned with the bounds of the vertex. Note this value
* doesn't affect the positioning of label within the label bounds, to move
* the label vertically within the label bounds, use
* . Value is "verticalLabelPosition".
*/
static STYLE_VERTICAL_LABEL_POSITION: 'verticalLabelPosition';
/**
* Defines the key for the image aspect style. Possible values are 0 (do
* not preserve aspect) or 1 (keep aspect). This is only used in
* . Default is 1. Value is "imageAspect".
*/
static STYLE_IMAGE_ASPECT: 'imageAspect';
/**
* Defines the key for the align style. Possible values are ;
* and . The value defines how any image in the
* vertex label is aligned horizontally within the label bounds of a
* shape. Value is "imageAlign".
*/
static STYLE_IMAGE_ALIGN: 'imageAlign';
/**
* Defines the key for the verticalAlign style. Possible values are
* , and . The value defines how
* any image in the vertex label is aligned vertically within the label
* bounds of a shape. Value is "imageVerticalAlign".
*/
static STYLE_IMAGE_VERTICAL_ALIGN: 'imageVerticalAlign';
/**
* Defines the key for the glass style. Possible values are 0 (disabled) and
* 1(enabled). The default value is 0. This is used in . Value is
* "glass".
*/
static STYLE_GLASS: 'glass';
/**
* Defines the key for the image style. Possible values are any image URL;
* the type of the value is String. This is the path to the image that is
* to be displayed within the label of a vertex. Data URLs should use the
* following format: data:image/png,xyz where xyz is the base64 encoded
* data (without the "base64"-prefix). Note that Data URLs are only
* supported in modern browsers. Value is "image".
*/
static STYLE_IMAGE: 'image';
/**
* Defines the key for the imageWidth style. The type of this value is
* int, the value is the image width in pixels and must be greater than 0.
* Value is "imageWidth".
*/
static STYLE_IMAGE_WIDTH: 'imageWidth';
/**
* Defines the key for the imageHeight style. The type of this value is
* int, the value is the image height in pixels and must be greater than 0.
* Value is "imageHeight".
*/
static STYLE_IMAGE_HEIGHT: 'imageHeight';
/**
* Defines the key for the image background color. This style is only used
* in . Possible values are all HTML color names or HEX
* codes. Value is "imageBackground".
*/
static STYLE_IMAGE_BACKGROUND: 'imageBackground';
/**
* Defines the key for the image border color. This style is only used in
* . Possible values are all HTML color names or HEX codes.
* Value is "imageBorder".
*/
static STYLE_IMAGE_BORDER: 'imageBorder';
/**
* Defines the key for the horizontal image flip. This style is only used
* in . Possible values are 0 and 1. Default is 0. Value is
* "flipH".
*/
static STYLE_FLIPH: 'flipH';
/**
* Defines the key for the vertical flip. Possible values are 0 and 1.
* Default is 0. Value is "flipV".
*/
static STYLE_FLIPV: 'flipV';
/**
* Defines the key for the noLabel style. If this is true then no label is
* visible for a given cell. Possible values are true or false (1 or 0).
* Default is false. Value is "noLabel".
*/
static STYLE_NOLABEL: 'noLabel';
/**
* Defines the key for the noEdgeStyle style. If this is true then no edge
* style is applied for a given edge. Possible values are true or false
* (1 or 0). Default is false. Value is "noEdgeStyle".
*/
static STYLE_NOEDGESTYLE: 'noEdgeStyle';
/**
* Defines the key for the label background color. Possible values are all
* HTML color names or HEX codes. Value is "labelBackgroundColor".
*/
static STYLE_LABEL_BACKGROUNDCOLOR: 'labelBackgroundColor';
/**
* Defines the key for the label border color. Possible values are all
* HTML color names or HEX codes. Value is "labelBorderColor".
*/
static STYLE_LABEL_BORDERCOLOR: 'labelBorderColor';
/**
* Defines the key for the label padding, ie. the space between the label
* border and the label. Value is "labelPadding".
*/
static STYLE_LABEL_PADDING: 'labelPadding';
/**
* Defines the key for the indicator shape used within an .
* Possible values are all SHAPE_* constants or the names of any new
* shapes. The indicatorShape has precedence over the indicatorImage.
* Value is "indicatorShape".
*/
static STYLE_INDICATOR_SHAPE: 'indicatorShape';
/**
* Defines the key for the indicator image used within an .
* Possible values are all image URLs. The indicatorShape has
* precedence over the indicatorImage. Value is "indicatorImage".
*/
static STYLE_INDICATOR_IMAGE: 'indicatorImage';
/**
* Defines the key for the indicatorColor style. Possible values are all
* HTML color names or HEX codes, as well as the special 'swimlane' keyword
* to refer to the color of the parent swimlane if one exists. Value is
* "indicatorColor".
*/
static STYLE_INDICATOR_COLOR: 'indicatorColor';
/**
* Defines the key for the indicator stroke color in .
* Possible values are all color codes. Value is "indicatorStrokeColor".
*/
static STYLE_INDICATOR_STROKECOLOR: 'indicatorStrokeColor';
/**
* Defines the key for the indicatorGradientColor style. Possible values
* are all HTML color names or HEX codes. This style is only supported in
* shapes. Value is "indicatorGradientColor".
*/
static STYLE_INDICATOR_GRADIENTCOLOR: 'indicatorGradientColor';
/**
* The defines the key for the spacing between the label and the
* indicator in . Possible values are in pixels. Value is
* "indicatorSpacing".
*/
static STYLE_INDICATOR_SPACING: 'indicatorSpacing';
/**
* Defines the key for the indicator width. Possible values start at 0 (in
* pixels). Value is "indicatorWidth".
*/
static STYLE_INDICATOR_WIDTH: 'indicatorWidth';
/**
* Defines the key for the indicator height. Possible values start at 0 (in
* pixels). Value is "indicatorHeight".
*/
static STYLE_INDICATOR_HEIGHT: 'indicatorHeight';
/**
* Defines the key for the indicatorDirection style. The direction style is
* used to specify the direction of certain shapes (eg. ).
* Possible values are (default), ;
* and . Value is "indicatorDirection".
*/
static STYLE_INDICATOR_DIRECTION: 'indicatorDirection';
/**
* Defines the key for the shadow style. The type of the value is Boolean.
* Value is "shadow".
*/
static STYLE_SHADOW: 'shadow';
/**
* Defines the key for the segment style. The type of this value is float
* and the value represents the size of the horizontal segment of the
* entity relation style. Default is ENTITY_SEGMENT. Value is "segment".
*/
static STYLE_SEGMENT: 'segment';
/**
* Defines the key for the end arrow marker. Possible values are all
* constants with an ARROW-prefix. This is only used in .
* Value is "endArrow".
*
* Example:
* (code)
* style[mxConstants.STYLE_ENDARROW] = mxConstants.ARROW_CLASSIC;
* (end)
*/
static STYLE_ENDARROW: 'endArrow';
/**
* Defines the key for the start arrow marker. Possible values are all
* constants with an ARROW-prefix. This is only used in .
* See . Value is "startArrow".
*/
static STYLE_STARTARROW: 'startArrow';
/**
* Defines the key for the endSize style. The type of this value is numeric
* and the value represents the size of the end marker in pixels. Value is
* "endSize".
*/
static STYLE_ENDSIZE: 'endSize';
/**
* Defines the key for the startSize style. The type of this value is
* numeric and the value represents the size of the start marker or the
* size of the swimlane title region depending on the shape it is used for.
* Value is "startSize".
*/
static STYLE_STARTSIZE: 'startSize';
/**
* Defines the key for the swimlaneLine style. This style specifies whether
* the line between the title regio of a swimlane should be visible. Use 0
* for hidden or 1 (default) for visible. Value is "swimlaneLine".
*/
static STYLE_SWIMLANE_LINE: 'swimlaneLine';
/**
* Defines the key for the endFill style. Use 0 for no fill or 1 (default)
* for fill. (This style is only exported via .) Value is
* "endFill".
*/
static STYLE_ENDFILL: 'endFill';
/**
* Defines the key for the startFill style. Use 0 for no fill or 1 (default)
* for fill. (This style is only exported via .) Value is
* "startFill".
*/
static STYLE_STARTFILL: 'startFill';
/**
* Defines the key for the dashed style. Use 0 (default) for non-dashed or 1
* for dashed. Value is "dashed".
*/
static STYLE_DASHED: 'dashed';
/**
* Defines the key for the dashed pattern style in SVG and image exports.
* The type of this value is a space separated list of numbers that specify
* a custom-defined dash pattern. Dash styles are defined in terms of the
* length of the dash (the drawn part of the stroke) and the length of the
* space between the dashes. The lengths are relative to the line width: a
* length of "1" is equal to the line width. VML ignores this style and
* uses dashStyle instead as defined in the VML specification. This style
* is only used in the shape. Value is "dashPattern".
*/
static STYLE_DASH_PATTERN: 'dashPattern';
/**
* Defines the key for the fixDash style. Use 0 (default) for dash patterns
* that depend on the linewidth and 1 for dash patterns that ignore the
* line width. Value is "fixDash".
*/
static STYLE_FIX_DASH: 'fixDash';
/**
* Defines the key for the rounded style. The type of this value is
* Boolean. For edges this determines whether or not joins between edges
* segments are smoothed to a rounded finish. For vertices that have the
* rectangle shape, this determines whether or not the rectangle is
* rounded. Use 0 (default) for non-rounded or 1 for rounded. Value is
* "rounded".
*/
static STYLE_ROUNDED: 'rounded';
/**
* Defines the key for the curved style. The type of this value is
* Boolean. It is only applicable for connector shapes. Use 0 (default)
* for non-curved or 1 for curved. Value is "curved".
*/
static STYLE_CURVED: 'curved';
/**
* Defines the rounding factor for a rounded rectangle in percent (without
* the percent sign). Possible values are between 0 and 100. If this value
* is not specified then RECTANGLE_ROUNDING_FACTOR * 100 is used. For
* edges, this defines the absolute size of rounded corners in pixels. If
* this values is not specified then LINE_ARCSIZE is used.
* (This style is only exported via .) Value is "arcSize".
*/
static STYLE_ARCSIZE: 'arcSize';
/**
* Defines the key for the absolute arc size style. This specifies if
* arcSize for rectangles is abolute or relative. Possible values are 1
* and 0 (default). Value is "absoluteArcSize".
*/
static STYLE_ABSOLUTE_ARCSIZE: 'absoluteArcSize';
/**
* Defines the key for the source perimeter spacing. The type of this value
* is numeric. This is the distance between the source connection point of
* an edge and the perimeter of the source vertex in pixels. This style
* only applies to edges. Value is "sourcePerimeterSpacing".
*/
static STYLE_SOURCE_PERIMETER_SPACING: 'sourcePerimeterSpacing';
/**
* Defines the key for the target perimeter spacing. The type of this value
* is numeric. This is the distance between the target connection point of
* an edge and the perimeter of the target vertex in pixels. This style
* only applies to edges. Value is "targetPerimeterSpacing".
*/
static STYLE_TARGET_PERIMETER_SPACING: 'targetPerimeterSpacing';
/**
* Defines the key for the perimeter spacing. This is the distance between
* the connection point and the perimeter in pixels. When used in a vertex
* style, this applies to all incoming edges to floating ports (edges that
* terminate on the perimeter of the vertex). When used in an edge style;
* this spacing applies to the source and target separately, if they
* terminate in floating ports (on the perimeter of the vertex). Value is
* "perimeterSpacing".
*/
static STYLE_PERIMETER_SPACING: 'perimeterSpacing';
/**
* Defines the key for the spacing. The value represents the spacing, in
* pixels, added to each side of a label in a vertex (style applies to
* vertices only). Value is "spacing".
*/
static STYLE_SPACING: 'spacing';
/**
* Defines the key for the spacingTop style. The value represents the
* spacing, in pixels, added to the top side of a label in a vertex (style
* applies to vertices only). Value is "spacingTop".
*/
static STYLE_SPACING_TOP: 'spacingTop';
/**
* Defines the key for the spacingLeft style. The value represents the
* spacing, in pixels, added to the left side of a label in a vertex (style
* applies to vertices only). Value is "spacingLeft".
*/
static STYLE_SPACING_LEFT: 'spacingLeft';
/**
* Defines the key for the spacingBottom style The value represents the
* spacing, in pixels, added to the bottom side of a label in a vertex
* (style applies to vertices only). Value is "spacingBottom".
*/
static STYLE_SPACING_BOTTOM: 'spacingBottom';
/**
* Defines the key for the spacingRight style The value represents the
* spacing, in pixels, added to the right side of a label in a vertex (style
* applies to vertices only). Value is "spacingRight".
*/
static STYLE_SPACING_RIGHT: 'spacingRight';
/**
* Defines the key for the horizontal style. Possible values are
* true or false. This value only applies to vertices. If the
* is "SHAPE_SWIMLANE" a value of false indicates that the
* swimlane should be drawn vertically, true indicates to draw it
* horizontally. If the shape style does not indicate that this vertex is a
* swimlane, this value affects only whether the label is drawn
* horizontally or vertically. Value is "horizontal".
*/
static STYLE_HORIZONTAL: 'horizontal';
/**
* Defines the key for the direction style. The direction style is used
* to specify the direction of certain shapes (eg. ).
* Possible values are (default), ;
* and . Value is "direction".
*/
static STYLE_DIRECTION: 'direction';
/**
* Defines the key for the anchorPointDirection style. The defines if the
* direction style should be taken into account when computing the fixed
* point location for connected edges. Default is 1 (yes). Set this to 0
* to ignore the direction style for fixed connection points. Value is
* "anchorPointDirection".
*/
static STYLE_ANCHOR_POINT_DIRECTION: 'anchorPointDirection';
/**
* Defines the key for the elbow style. Possible values are
* and . Default is .
* This defines how the three segment orthogonal edge style leaves its
* terminal vertices. The vertical style leaves the terminal vertices at
* the top and bottom sides. Value is "elbow".
*/
static STYLE_ELBOW: 'elbow';
/**
* Defines the key for the fontColor style. Possible values are all HTML
* color names or HEX codes. Value is "fontColor".
*/
static STYLE_FONTCOLOR: 'fontColor';
/**
* Defines the key for the fontFamily style. Possible values are names such
* as Arial; Dialog; Verdana; Times New Roman. The value is of type String.
* Value is fontFamily.
*/
static STYLE_FONTFAMILY: 'fontFamily';
/**
* Defines the key for the fontSize style (in px). The type of the value
* is int. Value is "fontSize".
*/
static STYLE_FONTSIZE: 'fontSize';
/**
* Defines the key for the fontStyle style. Values may be any logical AND
* (sum) of , and .
* The type of the value is int. Value is "fontStyle".
*/
static STYLE_FONTSTYLE: 'fontStyle';
/**
* Defines the key for the aspect style. Possible values are empty or fixed.
* If fixed is used then the aspect ratio of the cell will be maintained
* when resizing. Default is empty. Value is "aspect".
*/
static STYLE_ASPECT: 'aspect';
/**
* Defines the key for the autosize style. This specifies if a cell should be
* resized automatically if the value has changed. Possible values are 0 or 1.
* Default is 0. See . This is normally combined with
* to disable manual sizing. Value is "autosize".
*/
static STYLE_AUTOSIZE: 'autosize';
/**
* Defines the key for the foldable style. This specifies if a cell is foldable
* using a folding icon. Possible values are 0 or 1. Default is 1. See
* . Value is "foldable".
*/
static STYLE_FOLDABLE: 'foldable';
/**
* Defines the key for the editable style. This specifies if the value of
* a cell can be edited using the in-place editor. Possible values are 0 or
* 1. Default is 1. See . Value is "editable".
*/
static STYLE_EDITABLE: 'editable';
/**
* Defines the key for the backgroundOutline style. This specifies if a
* only the background of a cell should be painted when it is highlighted.
* Possible values are 0 or 1. Default is 0. Value is "backgroundOutline".
*/
static STYLE_BACKGROUND_OUTLINE: 'backgroundOutline';
/**
* Defines the key for the bendable style. This specifies if the control
* points of an edge can be moved. Possible values are 0 or 1. Default is
* 1. See . Value is "bendable".
*/
static STYLE_BENDABLE: 'bendable';
/**
* Defines the key for the movable style. This specifies if a cell can
* be moved. Possible values are 0 or 1. Default is 1. See
* . Value is "movable".
*/
static STYLE_MOVABLE: 'movable';
/**
* Defines the key for the resizable style. This specifies if a cell can
* be resized. Possible values are 0 or 1. Default is 1. See
* . Value is "resizable".
*/
static STYLE_RESIZABLE: 'resizable';
/**
* Defines the key for the resizeWidth style. This specifies if a cell's
* width is resized if the parent is resized. If this is 1 then the width
* will be resized even if the cell's geometry is relative. If this is 0
* then the cell's width will not be resized. Default is not defined. Value
* is "resizeWidth".
*/
static STYLE_RESIZE_WIDTH: 'resizeWidth';
/**
* Defines the key for the resizeHeight style. This specifies if a cell's
* height if resize if the parent is resized. If this is 1 then the height
* will be resized even if the cell's geometry is relative. If this is 0
* then the cell's height will not be resized. Default is not defined. Value
* is "resizeHeight".
*/
static STYLE_RESIZE_HEIGHT: 'resizeHeight';
/**
* Defines the key for the rotatable style. This specifies if a cell can
* be rotated. Possible values are 0 or 1. Default is 1. See
* . Value is "rotatable".
*/
static STYLE_ROTATABLE: 'rotatable';
/**
* Defines the key for the cloneable style. This specifies if a cell can
* be cloned. Possible values are 0 or 1. Default is 1. See
* . Value is "cloneable".
*/
static STYLE_CLONEABLE: 'cloneable';
/**
* Defines the key for the deletable style. This specifies if a cell can be
* deleted. Possible values are 0 or 1. Default is 1. See
* . Value is "deletable".
*/
static STYLE_DELETABLE: 'deletable';
/**
* Defines the key for the shape. Possible values are all constants with
* a SHAPE-prefix or any newly defined shape names. Value is "shape".
*/
static STYLE_SHAPE: 'shape';
/**
* Defines the key for the edge style. Possible values are the functions
* defined in . Value is "edgeStyle".
*/
static STYLE_EDGE: 'edgeStyle';
/**
* Defines the key for the jetty size in .
* Default is 10. Possible values are all numeric values or "auto".
* Value is "jettySize".
*/
static STYLE_JETTY_SIZE: 'jettySize';
/**
* Defines the key for the jetty size in .
* Default is 10. Possible values are numeric values or "auto". This has
* precedence over . Value is "sourceJettySize".
*/
static STYLE_SOURCE_JETTY_SIZE: 'sourceJettySize';
/**
* Defines the key for the jetty size in .
* Default is 10. Possible values are numeric values or "auto". This has
* precedence over . Value is "targetJettySize".
*/
static STYLE_TARGET_JETTY_SIZE: 'targetJettySize';
/**
* Defines the key for the loop style. Possible values are the functions
* defined in . Value is "loopStyle".
*/
static STYLE_LOOP: 'loopStyle';
/**
* Defines the key for the orthogonal loop style. Possible values are 0 and
* 1. Default is 0. Value is "orthogonalLoop". Use this style to specify
* if loops should be routed using an orthogonal router. Currently, this
* uses but will be replaced with a dedicated
* orthogonal loop router in later releases.
*/
static STYLE_ORTHOGONAL_LOOP: 'orthogonalLoop';
/**
* Defines the key for the horizontal routing center. Possible values are
* between -0.5 and 0.5. This is the relative offset from the center used
* for connecting edges. The type of this value is numeric. Value is
* "routingCenterX".
*/
static STYLE_ROUTING_CENTER_X: 'routingCenterX';
/**
* Defines the key for the vertical routing center. Possible values are
* between -0.5 and 0.5. This is the relative offset from the center used
* for connecting edges. The type of this value is numeric. Value is
* "routingCenterY".
*/
static STYLE_ROUTING_CENTER_Y: 'routingCenterY';
/**
* Constant for bold fonts. Default is 1.
* @default 1
*/
static FONT_BOLD: number;
/**
* Constant for italic fonts. Default is 2.
* @default 2
*/
static FONT_ITALIC: number;
/**
* Constant for underlined fonts. Default is 4.
* @default 4
*/
static FONT_UNDERLINE: number;
/**
* Constant for strikthrough fonts. Default is 8.
* @since mxgraph 4.1.0
* @default 8
*/
static FONT_STRIKETHROUGH: number;
/**
* Name under which is registered in .
* Default is rectangle.
*/
static SHAPE_RECTANGLE: 'rectangle';
/**
* Name under which is registered in .
* Default is ellipse.
*/
static SHAPE_ELLIPSE: 'ellipse';
/**
* Name under which is registered in .
* Default is doubleEllipse.
*/
static SHAPE_DOUBLE_ELLIPSE: 'doubleEllipse';
/**
* Name under which is registered in .
* Default is rhombus.
*/
static SHAPE_RHOMBUS: 'rhombus';
/**
* Name under which is registered in .
* Default is line.
*/
static SHAPE_LINE: 'line';
/**
* Name under which is registered in .
* Default is image.
*/
static SHAPE_IMAGE: 'image';
/**
* Name under which is registered in .
* Default is arrow.
*/
static SHAPE_ARROW: 'arrow';
/**
* Name under which is registered in .
* Default is arrowConnector.
*/
static SHAPE_ARROW_CONNECTOR: 'arrowConnector';
/**
* Name under which is registered in .
* Default is label.
*/
static SHAPE_LABEL: 'label';
/**
* Name under which is registered in .
* Default is cylinder.
*/
static SHAPE_CYLINDER: 'cylinder';
/**
* Name under which is registered in .
* Default is swimlane.
*/
static SHAPE_SWIMLANE: 'swimlane';
/**
* Name under which is registered in .
* Default is connector.
*/
static SHAPE_CONNECTOR: 'connector';
/**
* Name under which is registered in .
* Default is actor.
*/
static SHAPE_ACTOR: 'actor';
/**
* Name under which is registered in .
* Default is cloud.
*/
static SHAPE_CLOUD: 'cloud';
/**
* Name under which is registered in .
* Default is triangle.
*/
static SHAPE_TRIANGLE: 'triangle';
/**
* Name under which is registered in .
* Default is hexagon.
*/
static SHAPE_HEXAGON: 'hexagon';
/**
* Constant for classic arrow markers.
*/
static ARROW_CLASSIC: 'classic';
/**
* Constant for thin classic arrow markers.
*/
static ARROW_CLASSIC_THIN: 'classicThin';
/**
* Constant for block arrow markers.
*/
static ARROW_BLOCK: 'block';
/**
* Constant for thin block arrow markers.
*/
static ARROW_BLOCK_THIN: 'blockThin';
/**
* Constant for open arrow markers.
*/
static ARROW_OPEN: 'open';
/**
* Constant for thin open arrow markers.
*/
static ARROW_OPEN_THIN: 'openThin';
/**
* Constant for oval arrow markers.
*/
static ARROW_OVAL: 'oval';
/**
* Constant for diamond arrow markers.
*/
static ARROW_DIAMOND: 'diamond';
/**
* Constant for thin diamond arrow markers.
*/
static ARROW_DIAMOND_THIN: 'diamondThin';
/**
* Constant for left horizontal alignment. Default is left.
*/
static ALIGN_LEFT: 'left';
/**
* Constant for center horizontal alignment. Default is center.
*/
static ALIGN_CENTER: 'center';
/**
* Constant for right horizontal alignment. Default is right.
*/
static ALIGN_RIGHT: 'right';
/**
* Constant for top vertical alignment. Default is top.
*/
static ALIGN_TOP: 'top';
/**
* Constant for middle vertical alignment. Default is middle.
*/
static ALIGN_MIDDLE: 'middle';
/**
* Constant for bottom vertical alignment. Default is bottom.
*/
static ALIGN_BOTTOM: 'bottom';
/**
* Constant for direction north. Default is north.
*/
static DIRECTION_NORTH: 'north';
/**
* Constant for direction south. Default is south.
*/
static DIRECTION_SOUTH: 'south';
/**
* Constant for direction east. Default is east.
*/
static DIRECTION_EAST: 'east';
/**
* Constant for direction west. Default is west.
*/
static DIRECTION_WEST: 'west';
/**
* Constant for text direction default. Default is an empty string. Use
* this value to use the default text direction of the operating system.
*/
static TEXT_DIRECTION_DEFAULT: '';
/**
* Constant for text direction automatic. Default is auto. Use this value
* to find the direction for a given text with .
*/
static TEXT_DIRECTION_AUTO: 'auto';
/**
* Constant for text direction left to right. Default is ltr. Use this
* value for left to right text direction.
*/
static TEXT_DIRECTION_LTR: 'ltr';
/**
* Constant for text direction right to left. Default is rtl. Use this
* value for right to left text direction.
*/
static TEXT_DIRECTION_RTL: 'rtl';
/**
* Constant for no direction.
* @default 0
*/
static DIRECTION_MASK_NONE: number;
/**
* Bitwise mask for west direction.
* @default 1
*/
static DIRECTION_MASK_WEST: number;
/**
* Bitwise mask for north direction.
* @default 2
*/
static DIRECTION_MASK_NORTH: number;
/**
* Bitwise mask for south direction.
* @default 4
*/
static DIRECTION_MASK_SOUTH: number;
/**
* Bitwise mask for east direction.
* @default 8
*/
static DIRECTION_MASK_EAST: number;
/**
* Bitwise mask for all directions.
* @default 15
*/
static DIRECTION_MASK_ALL: number;
/**
* Constant for elbow vertical. Default is horizontal.
*/
static ELBOW_VERTICAL: 'vertical';
/**
* Constant for elbow horizontal. Default is horizontal.
*/
static ELBOW_HORIZONTAL: 'horizontal';
/**
* Name of the elbow edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_ELBOW: 'elbowEdgeStyle';
/**
* Name of the entity relation edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_ENTITY_RELATION: 'entityRelationEdgeStyle';
/**
* Name of the loop edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_LOOP: 'loopEdgeStyle';
/**
* Name of the side to side edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_SIDETOSIDE: 'sideToSideEdgeStyle';
/**
* Name of the top to bottom edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_TOPTOBOTTOM: 'topToBottomEdgeStyle';
/**
* Name of the generic orthogonal edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_ORTHOGONAL: 'orthogonalEdgeStyle';
/**
* Name of the generic segment edge style. Can be used as a string value
* for the STYLE_EDGE style.
*/
static EDGESTYLE_SEGMENT: 'segmentEdgeStyle';
/**
* Name of the ellipse perimeter. Can be used as a string value
* for the STYLE_PERIMETER style.
*/
static PERIMETER_ELLIPSE: 'ellipsePerimeter';
/**
* Name of the rectangle perimeter. Can be used as a string value
* for the STYLE_PERIMETER style.
*/
static PERIMETER_RECTANGLE: 'rectanglePerimeter';
/**
* Name of the rhombus perimeter. Can be used as a string value
* for the STYLE_PERIMETER style.
*/
static PERIMETER_RHOMBUS: 'rhombusPerimeter';
/**
* Name of the hexagon perimeter. Can be used as a string value
* for the STYLE_PERIMETER style.
*/
static PERIMETER_HEXAGON: 'hexagonPerimeter';
/**
* Name of the triangle perimeter. Can be used as a string value
* for the STYLE_PERIMETER style.
*/
static PERIMETER_TRIANGLE: 'trianglePerimeter'
}
declare type mxDialectConstants = 'svg' | 'vml' | 'mixedHtml' | 'preferHtml' | 'strictHtml';
/**
* @class mxGeometry
*
* @extends {mxRectangle}
*
* For vertices, the geometry consists of the x- and y-location, and the width
* and height. For edges, the geometry consists of the optional terminal- and
* control points. The terminal points are only required if an edge is
* unconnected, and are stored in the {@link sourcePoint} and {@link targetPoint}
* variables, respectively.
*
* ### Example
*
* If an edge is unconnected, that is, it has no source or target terminal,
* then a geometry with terminal points for a new edge can be defined as
* follows.
*
* ```javascript
* geometry.setTerminalPoint(new mxPoint(x1, y1), true);
* geometry.points: [new mxPoint(x2, y2)];
* geometry.setTerminalPoint(new mxPoint(x3, y3), false);
* ```
*
* Control points are used regardless of the connected state of an edge and may
* be ignored or interpreted differently depending on the edge's {@link mxEdgeStyle}.
*
* To disable automatic reset of control points after a cell has been moved or
* resized, the the {@link mxGraph.resizeEdgesOnMove} and
* {@link mxGraph.resetEdgesOnResize} may be used.
*
* ### Edge Labels
*
* Using the x- and y-coordinates of a cell's geometry, it is possible to
* position the label on edges on a specific location on the actual edge shape
* as it appears on the screen. The x-coordinate of an edge's geometry is used
* to describe the distance from the center of the edge from -1 to 1 with 0
* being the center of the edge and the default value. The y-coordinate of an
* edge's geometry is used to describe the absolute, orthogonal distance in
* pixels from that point. In addition, the {@link mxGeometry.offset} is used as an
* absolute offset vector from the resulting point.
*
* This coordinate system is applied if {@link relative} is true, otherwise the
* offset defines the absolute vector from the edge's center point to the
* label and the values for {@link x} and {@link y} are ignored.
*
* The width and height parameter for edge geometries can be used to set the
* label width and height (eg. for word wrapping).
*
* ### Ports
*
* The term "port" refers to a relatively positioned, connectable child cell,
* which is used to specify the connection between the parent and another cell
* in the graph. Ports are typically modeled as vertices with relative
* geometries.
*
* ### Offsets
*
* The {@link offset} field is interpreted in 3 different ways, depending on the cell
* and the geometry. For edges, the offset defines the absolute offset for the
* edge label. For relative geometries, the offset defines the absolute offset
* for the origin (top, left corner) of the vertex, otherwise the offset
* defines the absolute offset for the label inside the vertex or group.
*/
declare class mxGeometry extends mxRectangle {
constructor(x?: number, y?: number, width?: number, height?: number);
/**
* Global switch to translate the points in translate. Default is true.
*/
TRANSLATE_CONTROL_POINTS: boolean;
/**
* Stores alternate values for x, y, width and height in a rectangle.
* See {@link swap} to exchange the values. Default is null.
*
* @see {@link swap}
*/
alternateBounds: mxRectangle;
/**
* Defines the source {@link mxPoint} of the edge. This is used if the
* corresponding edge does not have a source vertex. Otherwise it is
* ignored. Default is null.
*/
sourcePoint: mxPoint;
/**
* Defines the target {@link mxPoint} of the edge. This is used if the
* corresponding edge does not have a target vertex. Otherwise it is
* ignored. Default is null.
*/
targetPoint: mxPoint;
/**
* Array of {@link mxPoints} which specifies the control points along the edge.
* These points are the intermediate points on the edge, for the endpoints
* use {@link targetPoint} and {@link sourcePoint} or set the terminals of the edge to
* a non-null value. Default is null.
*/
points: Array;
/**
* For edges, this holds the offset (in pixels) from the position defined
* by {@link x} and {@link y} on the edge. For relative geometries (for vertices), this
* defines the absolute offset from the point defined by the relative
* coordinates. For absolute geometries (for vertices), this defines the
* offset for the label. Default is null.
*/
offset: mxPoint;
/**
* Specifies if the coordinates in the geometry are to be interpreted as
* relative coordinates. For edges, this is used to define the location of
* the edge label relative to the edge as rendered on the display. For
* vertices, this specifies the relative location inside the bounds of the
* parent cell.
*
* If this is false, then the coordinates are relative to the origin of the
* parent cell or, for edges, the edge label position is relative to the
* center of the edge as rendered on screen.
*
* Default is false.
*/
relative: boolean;
setRelative(relative: boolean): void;
/**
* Swaps the x, y, width and height with the values stored in
* {@link alternateBounds} and puts the previous values into {@link alternateBounds} as
* a rectangle. This operation is carried-out in-place, that is, using the
* existing geometry instance. If this operation is called during a graph
* model transactional change, then the geometry should be cloned before
* calling this method and setting the geometry of the cell using
* {@link mxGraphModel.setGeometry}.
*/
swap(): void;
/**
* Returns the {@link mxPoint} representing the source or target point of this
* edge. This is only used if the edge has no source or target vertex.
*
* @param {Boolean} isSource that specifies if the source or target point should be returned.
*/
getTerminalPoint(isSource: boolean): mxPoint;
/**
* Sets the {@link sourcePoint} or {@link targetPoint} to the given {@link mxPoint} and
* returns the new point.
*
* @param {Point} point to be used as the new source or target point.
* @param {Boolean} isSource that specifies if the source or target point should be set.
*/
setTerminalPoint(point: mxPoint, isSource: boolean): mxPoint;
/**
* Rotates the geometry by the given angle around the given center. That is,
* {@link x} and {@link y} of the geometry, the {@link sourcePoint}, {@link targetPoint} and all
* {@link points} are translated by the given amount. {@link x} and {@link y} are only
* translated if {@link relative} is false.
*
* @param {Number} angle that specifies the rotation angle in degrees.
* @param {mxPoint} cx that specifies the center of the rotation.
*/
rotate(angle: number, cx: mxPoint): void;
/**
* Translates the geometry by the specified amount. That is, {@link x} and {@link y} of the
* geometry, the {@link sourcePoint}, {@link targetPoint} and all {@link points} are translated
* by the given amount. {@link x} and {@link y} are only translated if {@link relative} is false.
* If {@link TRANSLATE_CONTROL_POINTS} is false, then {@link points} are not modified by
* this function.
*
* @param {Number} dx that specifies the x-coordinate of the translation.
* @param {Number} dy that specifies the y-coordinate of the translation.
*/
translate(dx: number, dy: number): void;
/**
* Scales the geometry by the given amount. That is, {@link x} and {@link y} of the
* geometry, the {@link sourcePoint}, {@link targetPoint} and all {@link points} are scaled
* by the given amount. {@link x}, {@link y}, {@link width} and {@link height} are only scaled if
* {@link relative} is false. If {@link fixedAspect} is true, then the smaller value
* is used to scale the width and the height.
*
* @param {Number} sx that specifies the horizontal scale factor.
* @param {Number} sy that specifies the vertical scale factor.
* @param {Optional} fixedAspect boolean to keep the aspect ratio fixed.
*/
scale(sx: number, sy: number, fixedAspect: boolean): void;
/**
* Returns true if the given object equals this geometry.
*/
equals(obj: mxGeometry): boolean;
clone(): mxGeometry;
}
declare class mxPoint {
constructor(x?: number, y?: number);
/**
* Variable: x
*
* Holds the x-coordinate of the point. Default is 0.
*/
x: number;
/**
* Variable: y
*
* Holds the y-coordinate of the point. Default is 0.
*/
y: number;
/**
* Function: equals
*
* Returns true if the given object equals this point.
*/
equals(obj: mxPoint): boolean;
/**
* Function: clone
*
* Returns a clone of this .
*/
clone(): mxPoint;
}
///
/**
* Cells are the elements of the graph model. They represent the state
* of the groups, vertices and edges in a graph.
*
* ### Custom attributes
* For custom attributes we recommend using an XML node as the value of a cell.
* The following code can be used to create a cell with an XML node as the value:
* @example
* ```javascript
* var doc = mxUtils.createXmlDocument();
* var node = doc.createElement('MyNode')
* node.setAttribute('label', 'MyLabel');
* node.setAttribute('attribute1', 'value1');
* graph.insertVertex(graph.getDefaultParent(), null, node, 40, 40, 80, 30);
* ```
*
* For the label to work, {@link mxGraph.convertValueToString} and
* {@link mxGraph.cellLabelChanged} should be overridden as follows:
*
* @example
* ```javascript
* graph.convertValueToString(cell)
* {
* if (mxUtils.isNode(cell.value))
* {
* return cell.getAttribute('label', '')
* }
* };
*
* var cellLabelChanged = graph.cellLabelChanged;
* graph.cellLabelChanged(cell, newValue, autoSize)
* {
* if (mxUtils.isNode(cell.value))
* {
* // Clones the value for correct undo/redo
* var elt = cell.value.cloneNode(true);
* elt.setAttribute('label', newValue);
* newValue = elt;
* }
*
* cellLabelChanged.apply(this, arguments);
* };
* ```
* @class mxCell
*/
declare class mxCell {
/**
* @param {*} value Optional object that represents the cell value.
* @param {mxGeometry} geometry Optional that specifies the geometry.
* @param {string} style Optional formatted string that defines the style.
*/
constructor(value?: any, geometry?: mxGeometry, style?: string);
/**
* @see {mxGraph.getCellOverlays}
*
* @type {Array}
*/
overlays: Array;
/**
* Holds the Id. Default is null.
*/
id: string;
/**
* Holds the user object. Default is null.
*/
value: any;
/**
* Holds the . Default is null.
*/
geometry: mxGeometry;
/**
* Holds the style as a string of the form [(stylename|key=value);]. Default is
* null.
*/
style: string;
/**
* Specifies whether the cell is a vertex. Default is false.
*/
vertex: boolean;
/**
* Specifies whether the cell is an edge. Default is false.
*/
edge: boolean;
/**
* Specifies whether the cell is connectable. Default is true.
*/
connectable: boolean;
/**
* Specifies whether the cell is visible. Default is true.
*/
visible: boolean;
/**
* Specifies whether the cell is collapsed. Default is false.
*/
collapsed: boolean;
/**
* Reference to the parent cell.
*/
parent: mxCell;
/**
* Reference to the source terminal.
*/
source: mxCell;
/**
* Reference to the target terminal.
*/
target: mxCell;
/**
* Holds the child cells.
*/
children: Array;
/**
* Holds the edges.
*/
edges: Array;
/**
* List of members that should not be cloned inside . This field is
* passed to and is not made persistent in .
* This is not a convention for all classes, it is only used in this class
* to mark transient fields since transient modifiers are not supported by
* the language.
*/
mxTransient: Array;
/**
* Returns the Id of the cell as a string.
*/
getId(): string;
/**
* Sets the Id of the cell to the given string.
*/
setId(id: string): void;
/**
* Returns the user object of the cell. The user
* object is stored in .
*/
getValue(): any;
/**
* Sets the user object of the cell. The user object
* is stored in .
*/
setValue(value: any): void;
/**
* Changes the user object after an in-place edit
* and returns the previous value. This implementation
* replaces the user object with the given value and
* returns the old user object.
*/
valueChanged(newValue: any): any;
/**
* Returns the that describes the .
*/
getGeometry(): mxGeometry;
/**
* Sets the to be used as the .
*/
setGeometry(geometry: mxGeometry): void;
/**
* Returns a string that describes the