├── Handlers.d.ts ├── Model.d.ts ├── README.md ├── Shape.d.ts ├── Util.d.ts ├── View.d.ts └── mxGraph.d.ts /Handlers.d.ts: -------------------------------------------------------------------------------- 1 |  2 | /****************** Handler **************/ 3 | 4 | declare class mxCellHighlight { 5 | 6 | /** 7 | * A helper class to highlight cells. 8 | */ 9 | constructor(graph: mxGraph, highlightColor: string, strokeWidth: number, dashed: boolean); 10 | 11 | /** Specifies if the highlights should appear on top of everything else in the overlay pane. Default is false. */ 12 | keepOnTop: boolean; 13 | 14 | /** Reference to the enclosing mxGraph. */ 15 | graph: mxGraph; 16 | 17 | /** Reference to the mxCellState. */ 18 | state: mxCellState; 19 | 20 | /** Specifies the spacing between the highlight for vertices and the vertex. Default is 2. */ 21 | spacing: number; 22 | 23 | /** Holds the handler that automatically invokes reset if the highlight should be hidden. */ 24 | resetHandler: any; 25 | 26 | /** 27 | * Sets the color of the rectangle used to highlight drop targets. 28 | * @param {string} color String that represents the new highlight color. 29 | */ 30 | setHighlightColor(color: string): void; 31 | 32 | /** 33 | * Creates and returns the highlight shape for the given state. 34 | */ 35 | drawHighlight(): void; 36 | 37 | /** 38 | * Creates and returns the highlight shape for the given state. 39 | */ 40 | createShape(): void; 41 | 42 | /** Updates the highlight after a change of the model or view. */ 43 | repaint(): void; 44 | 45 | /** Resets the state of the cell marker. */ 46 | hide(); 47 | 48 | /** 49 | * Marks the and fires a event. 50 | * @param {mxCellState} state 51 | */ 52 | highlight(state: mxCellState): void; 53 | 54 | /** Destroys the handler and all its resources and DOM nodes. */ 55 | destroy(); 56 | } 57 | 58 | 59 | 60 | /** 61 | * A helper class to process mouse locations and highlight cells. 62 | * Helper class to highlight cells 63 | */ 64 | declare class mxCellMarker { 65 | 66 | /** 67 | * Constructs a new cell marker 68 | * @param graph Reference to the enclosing mxGraph 69 | * @param validColor Optional marker color for valid states. Default is mxConstants.DEFAULT_VALID_COLOR. 70 | * @param invalidColor Optional marker color for invalid states. Default is mxConstants.DEFAULT_INVALID_COLOR. 71 | * @param hotspot Portion of the width and hight where a state intersects a given coordinate pair. A value of 0 means always highlight. Default is mxConstants.DEFAULT_HOTSPOT. 72 | */ 73 | constructor(graph: mxGraph, validColor?: string, invalidColor?: string, hotspot?: number); 74 | 75 | /** Reference to the enclosing mxGraph */ 76 | graph: mxGraph; 77 | 78 | /** Specifies if the marker is enabled. Default is true. */ 79 | enabled: boolean; 80 | 81 | /** Specifies the portion of the width and height that should trigger a highlight. The area around the center of the cell to be marked is used as the hotspot. Possible values are between 0 and 1. Default is mxConstants.DEFAULT_HOTSPOT. */ 82 | hotspot: number; 83 | 84 | /** Specifies if the hotspot is enabled. Default is false. */ 85 | hotspotEnabled: boolean; 86 | 87 | /** Holds the valid marker color. */ 88 | validColor: string; 89 | 90 | /** Holds the invalid marker color. */ 91 | invalidColor: string; 92 | 93 | /** Holds the current marker color. */ 94 | currentColor: string; 95 | 96 | /** Holds the marked mxCellState if it is valid. */ 97 | validState: mxCellState; 98 | 99 | /** Holds the marked mxCellState. */ 100 | markedState: mxCellState; 101 | 102 | /** 103 | * Enables or disables event handling. This implementation updates enabled. 104 | * @param {boolean} enabled 105 | */ 106 | setEnabled(enabled: boolean): void; 107 | 108 | /** 109 | * Returns true if events are handled. This implementation returns enabled. 110 | */ 111 | isEnabled(): boolean; 112 | 113 | /** 114 | * Sets the hotspot. 115 | * @param {number} hotspot 116 | */ 117 | setHotspot(hotspot: number): void; 118 | 119 | /** 120 | * Returns the hotspot. 121 | */ 122 | getHotspot(): number; 123 | 124 | /** 125 | * Specifies whether the hotspot should be used in intersects. 126 | * @param {boolean} enabled 127 | */ 128 | setHotspotEnabled(enabled: boolean): void; 129 | 130 | /** 131 | * Returns true if hotspot is used in intersects. 132 | */ 133 | isHotspotEnabled(): boolean; 134 | 135 | /** 136 | * Returns true if validState is not null. 137 | */ 138 | hasValidState(): boolean; 139 | 140 | /** 141 | * Returns the validState. 142 | */ 143 | getValidState(): mxCellState; 144 | 145 | /** 146 | * Returns the markedState. 147 | */ 148 | getMarkedState(): mxCellState; 149 | 150 | /** 151 | * Resets the state of the cell marker. 152 | */ 153 | reset(): any; 154 | 155 | /** 156 | * Processes the given event and cell and marks the state returned by getState with the color returned by 157 | * getMarkerColor. If the markerColor is not null, then the state is stored in markedState. If isValidState 158 | * returns true, then the state is stored in validState regardless of the marker color. The state is 159 | * returned regardless of the marker color and valid state. 160 | * @param {mxMouseEvent} me 161 | */ 162 | process(me: mxMouseEvent): void; 163 | 164 | /** 165 | * Marks the given cell using the given color, or validColor if no color is specified 166 | * @param {mxCell} cell 167 | * @param {string} color 168 | */ 169 | markCell(cell: mxCell, color: string): void; 170 | 171 | /** 172 | * Marks the markedState and fires a mark event. 173 | */ 174 | mark(): void; 175 | 176 | /** 177 | * Hides the marker and fires a mark event. 178 | */ 179 | unmark(): void; 180 | 181 | /** 182 | * Returns true if the given mxCellState is a valid state. If this returns true, then the state is 183 | * stored in validState. The return value of this method is used as the argument for getMarkerColor. 184 | * @param {mxCellState} state 185 | */ 186 | isValidState(state: mxCellState): void; 187 | 188 | /** 189 | * Returns the valid- or invalidColor depending on the value of isValid. The given mxCellState is ignored by this implementation. 190 | * @param {mxEvent} evt 191 | * @param {mxCellState} state 192 | * @param {boolean} isValid 193 | */ 194 | getMarkerColor(evt: mxEvent, state: mxCellState, isValid: boolean): string; 195 | 196 | /** 197 | * Uses getCell, getStateToMark and intersects to return the mxCellState for the given mxMouseEvent. 198 | * @param {mxMouseEvent} me 199 | */ 200 | getState(me: mxMouseEvent): mxCellState; 201 | 202 | /** 203 | * Returns the mxCell for the given event and cell. This returns the given cell. 204 | * @param {mxMouseEvent} me 205 | */ 206 | getCell(me: mxMouseEvent): mxCell; 207 | 208 | /** 209 | * Returns the mxCellState to be marked for the given mxCellState under the mouse. This returns the given state. 210 | * @param {mxCellState} state 211 | */ 212 | getStateToMark(state: mxCellState): mxCellState; 213 | 214 | /** 215 | * Returns true if the given coordinate pair intersects the given state. This returns true if the hotspot is 0 216 | * or the coordinates are inside the hotspot for the given cell state. 217 | * @param state 218 | * @param me 219 | */ 220 | intersects(state, me): boolean; 221 | 222 | /** 223 | * Destroys the handler and all its resources and DOM nodes. 224 | */ 225 | destroy(): void; 226 | 227 | } 228 | 229 | declare class mxConstraintHandler { 230 | 231 | } 232 | 233 | declare class mxEdgeHandler { 234 | 235 | /** Graph event handler that reconnects edges and modifies control points and the edge label location. 236 | * Uses for finding and highlighting new source and target vertices. This handler is 237 | * automatically created in mxGraph.createHandler for each selected edge. */ 238 | constructor(state: mxCellState); 239 | 240 | /** Reference to the enclosing mxGraph. */ 241 | graph: mxGraph; 242 | 243 | /** Reference to the mxCellState being modified. */ 244 | state: mxCellState; 245 | 246 | /** Holds the which is used for highlighting terminals. */ 247 | marker: mxCellMarker; 248 | 249 | /** Holds the mxConstraintHandler used for drawing and highlighting constraints. */ 250 | constraintHandler: mxConstraintHandler; 251 | 252 | /** Holds the current validation error while a connection is being changed. */ 253 | error: any; 254 | 255 | /** Holds the mxShape that represents the preview edge. */ 256 | shape: mxShape; 257 | 258 | /** Holds the mxShapes that represent the points. */ 259 | bends: mxShape[]; 260 | 261 | /** Holds the mxShape that represents the label position. */ 262 | labelShape: mxShape; 263 | 264 | /** Specifies if cloning by control-drag is enabled. Default is true. */ 265 | cloneEnabled: boolean; 266 | 267 | /** Specifies if adding bends by shift-click is enabled. Default is false. Note: This experimental feature is not recommended for production use */ 268 | addEnabled: boolean; 269 | 270 | /** Specifies if removing bends by shift-click is enabled. Default is false. Note: This experimental feature is not recommended for production use. */ 271 | removeEnabled: boolean; 272 | 273 | /** Specifies if removing bends by double click is enabled. Default is false. */ 274 | dblClickRemoveEnabled: boolean; 275 | 276 | /** Specifies if removing bends by dropping them on other bends is enabled. Default is false. */ 277 | mergeRemoveEnabled: boolean; 278 | 279 | /** Specifies if removing bends by creating straight segments should be enabled. If enabled, this can be overridden by holding down the alt key while moving. Default is false. */ 280 | straightRemoveEnabled: boolean; 281 | 282 | /** Specifies if virtual bends should be added in the center of each segments. These bends can then be used to add new waypoints. Default is false. */ 283 | virtualBendsEnabled: boolean; 284 | 285 | /** Opacity to be used for virtual bends (see virtualBendsEnabled). Default is 20. */ 286 | virtualBendOpacity: number; 287 | 288 | /** Specifies if the parent should be highlighted if a child cell is selected. Default is false. */ 289 | parentHighlightEnabled: boolean; 290 | 291 | /** Specifies if bends should be added to the graph container. This is updated in init based on whether the edge or one of its terminals has an HTML label in the container. */ 292 | preferHtml: boolean; 293 | 294 | /** Specifies if the bounds of handles should be used for hit-detection in IE Default is true. */ 295 | allowHandleBoundsCheck: boolean; 296 | 297 | /** Specifies if waypoints should snap to the routing centers of terminals. Default is false. */ 298 | snapToTerminals: boolean; 299 | 300 | /** Optional mxImage to be used as handles. Default is null. */ 301 | handleImage: mxImage; 302 | 303 | /** Optional tolerance for hit-detection in getHandleForEvent. Default is 0. */ 304 | tolerance: number; 305 | 306 | /** Specifies if connections to the outline of a highlighted target should be enabled. This will allow to place the connection point along the outline of the highlighted target. Default is false. */ 307 | outlineConnect: boolean; 308 | 309 | /** Specifies if the label handle should be moved if it intersects with another handle. Uses checkLabelHandle for checking and moving. Default is false. */ 310 | manageLabelHandle: boolean; 311 | 312 | /** 313 | * Initializes the shapes required for this edge handler. 314 | */ 315 | init(): void; 316 | 317 | /** 318 | * Returns an array of custom handles. This implementation returns null. 319 | */ 320 | createCustomHandles(): any; 321 | 322 | /** 323 | * Returns true if virtual bends should be added. This returns true if virtualBendsEnabled is true and the current style allows and renders custom waypoints. 324 | * @param {mxEvent} evt 325 | */ 326 | isVirtualBendsEnabled(evt: mxEvent): boolean; 327 | 328 | /** 329 | * Returns true if the given event is a trigger to add a new point. This implementation returns true if shift is pressed. 330 | * @param {mxEvent} evt 331 | */ 332 | isAddPointEvent(evt: mxEvent): boolean; 333 | 334 | /** 335 | * Returns true if the given event is a trigger to remove a point. This implementation returns true if shift is pressed. 336 | * @param {mxEvent} evt 337 | */ 338 | isRemovePointEvent(evt: mxEvent): boolean; 339 | 340 | /** 341 | * Returns the list of points that defines the selection stroke. 342 | * @param {mxCellState} state 343 | */ 344 | getSelectionPoints(state: mxCellState): mxPoint[]; 345 | 346 | /** 347 | * Creates the shape used to draw the selection border. 348 | * @param {mxPoint[]} points 349 | */ 350 | createSelectionShape(points: mxPoint[]): mxShape; 351 | 352 | /** 353 | * Returns mxConstants.EDGE_SELECTION_COLOR. 354 | */ 355 | getSelectionColor(): any; 356 | 357 | /** 358 | * Returns mxConstants.EDGE_SELECTION_STROKEWIDTH. 359 | */ 360 | getSelectionStrokeWidth(): number; 361 | 362 | /** 363 | * Returns . 364 | */ 365 | isSelectionDashed(): boolean; 366 | 367 | /** 368 | * Returns true if the given cell is connectable. This is a hook to disable floating connections. This implementation returns true. 369 | * @param {mxCell} cell 370 | */ 371 | isConnectableCell(cell: mxCell): boolean; 372 | 373 | /** 374 | * Creates and returns the mxCellMarker used in marker 375 | * @param {number} x 376 | * @param {number} y 377 | */ 378 | getCellAt(x: number, y: number): mxCellMarker; 379 | 380 | /** 381 | * Creates and returns the mxCellMarker used in marker. 382 | */ 383 | createMarker(): mxCellMarker; 384 | 385 | /** 386 | * Returns the error message or an empty string if the connection for the given source, target pair is not valid. 387 | * Otherwise it returns null. This implementation uses mxGraph.getEdgeValidationError. 388 | * @param {mxCell} source 389 | * @param {mxCell} target 390 | */ 391 | validateConnection(source: mxCell, target: mxCell): any; 392 | 393 | /** 394 | * Creates and returns the bends used for modifying the edge. This is typically an array of mxRectangleShapes. 395 | */ 396 | createBends(): mxRectangleShape[]; 397 | 398 | /** 399 | * Creates and returns the bends used for modifying the edge. This is typically an array of mxRectangleShapes. 400 | */ 401 | createVirtualBends(): mxRectangleShape[]; 402 | 403 | /** 404 | * Creates the shape used to display the given bend. 405 | * @param {number} index 406 | */ 407 | isHandleEnabled(index: number): boolean; 408 | 409 | /** 410 | * Returns true if the handle at the given index is visible. 411 | * @param {number} index 412 | */ 413 | isHandleVisible(index: number): boolean; 414 | 415 | /** 416 | * Creates the shape used to display the given bend. Note that the index may be null for special cases, 417 | * such as when called from mxElbowEdgeHandler.createVirtualBend. Only images and rectangles should be returned 418 | * if support for HTML labels with not foreign objects is required. 419 | * @param {any} index 420 | */ 421 | createHandleShape(index: any): mxShape; 422 | 423 | /** 424 | * Creates the shape used to display the the label handle. 425 | */ 426 | createLabelHandleShape(): mxShape; 427 | 428 | /** 429 | * Helper method to initialize the given bend. 430 | * @param {mxShape} bend 431 | */ 432 | initBend(bend: mxShape): void; 433 | 434 | /** 435 | * Returns the index of the handle for the given event. 436 | * @param {mxMouseEvent} me 437 | */ 438 | getHandleForEvent(me: mxMouseEvent): number; 439 | 440 | /** 441 | * Returns true if the given event allows virtual bends to be added. This implementation returns true. 442 | * @param {mxMouseEvent} me 443 | */ 444 | isAddVirtualBendEvent(me: mxMouseEvent): boolean; 445 | 446 | /** 447 | * Returns true if the given event allows custom handles to be changed. This implementation returns true. 448 | * @param me 449 | */ 450 | isCustomHandleEvent(mxMouseEvent): boolean; 451 | 452 | /** 453 | * Handles the event by checking if a special element of the handler was clicked, in which case the index parameter 454 | * is non-null. The indices may be one of or the number of the respective control point. 455 | * The source and target points are used for reconnecting the edge. 456 | * @param {any} sender 457 | * @param {mxMouseEvent} me 458 | */ 459 | mouseDown(sender: any, me: mxMouseEvent): any; 460 | 461 | /** 462 | * Starts the handling of the mouse gesture. 463 | * @param {number} x 464 | * @param {number} y 465 | * @param {number} index 466 | */ 467 | start(x: number, y: number, index: number): any; 468 | 469 | /** 470 | * Returns a clone of the current preview state for the given point and terminal. 471 | * @param {mxPoint} point 472 | * @param {mxCell} terminal 473 | */ 474 | clonePreviewState(point: mxPoint, terminal: mxCell): mxCellState; 475 | 476 | /** 477 | * Returns the tolerance for the guides. Default value is gridSize * scale / 2. 478 | */ 479 | getSnapToTerminalTolerance(): number; 480 | 481 | /** 482 | * Hook for subclassers do show details while the handler is active. 483 | * @param {mxMouseEvent} me 484 | * @param {mxPoint} point 485 | */ 486 | updateHint(me: mxMouseEvent, point: mxPoint): void; 487 | 488 | /** 489 | * Hooks for subclassers to hide details when the handler gets inactive. 490 | */ 491 | removeHint(): void; 492 | 493 | /** 494 | * Hook for rounding the unscaled width or height. This uses Math.round. 495 | * @param {number} length 496 | */ 497 | roundLength(length: number): number; 498 | 499 | /** 500 | * Returns true if snapToTerminals is true and if alt is not pressed. 501 | * @param me 502 | */ 503 | isSnapToTerminalsEvent(me): boolean; 504 | 505 | /** 506 | * Returns the point for the given event. 507 | * @param {mxMouseEvent} me 508 | */ 509 | getPointForEvent(me: mxMouseEvent): mxPoint; 510 | 511 | /** 512 | * Updates the given preview state taking into account the state of the constraint handler. 513 | * @param {mxMouseEvent} me 514 | */ 515 | getPreviewTerminalState(me: mxMouseEvent): mxCellState; 516 | 517 | /** 518 | * Updates the given preview state taking into account the state of the constraint handler. 519 | * @param {mxPoint} pt mxPoint that contains the current pointer position. 520 | * @param {mxMouseEvent} me Optional mxMouseEvent that contains the current event. 521 | */ 522 | getPreviewPoints(pt: mxPoint, me?: mxMouseEvent): mxPoint[]; 523 | 524 | /** 525 | * Returns true if outlineConnect is true and the source of the event is the outline shape or shift is pressed. 526 | * @param {mxMouseEvent} me 527 | */ 528 | isOutlineConnectEvent(me: mxMouseEvent): boolean; 529 | 530 | /** 531 | * Updates the given preview state taking into account the state of the constraint handler. 532 | * @param {mxCell} edge 533 | * @param {mxPoint} point 534 | * @param {mxCellState} terminalState 535 | * @param {mxMouseEvent} me 536 | */ 537 | updatePreviewState(edge: mxCell, point: mxPoint, terminalState: mxCellState, me: mxMouseEvent): void; 538 | 539 | /** 540 | * Handles the event by updating the preview. 541 | * @param {any} sender 542 | * @param {mxMouseEvent} me 543 | */ 544 | mouseMove(sender: any, me: mxMouseEvent): void; 545 | 546 | /** 547 | * Handles the event to applying the previewed changes on the edge by using moveLabel, connect or changePoints. 548 | * @param {any} sender 549 | * @param {mxMouseEvent} me 550 | */ 551 | mouseUp(sender: any, me: mxMouseEvent): void; 552 | 553 | /** 554 | * Resets the state of this handler. 555 | */ 556 | reset(): void; 557 | 558 | /** 559 | * Sets the color of the preview to the given value. 560 | * @param {any} color 561 | */ 562 | setPreviewColor(color: any): void; 563 | 564 | /** 565 | * Converts the given point in-place from screen to unscaled, untranslated graph coordinates and applies the grid. 566 | * Returns the given, modified point instance. 567 | * @param {mxPoint} point 568 | * @param {boolean} gridEnabled Boolean that specifies if the grid should be applied. 569 | */ 570 | convertPoint(point: mxPoint, gridEnabled: boolean): mxPoint; 571 | 572 | /** 573 | * Changes the coordinates for the label of the given edge. 574 | * @param {mxCellState} egdeState represents the edge. 575 | * @param {number} x Integer that specifies the x-coordinate of the new location. 576 | * @param {number} y Integer that specifies the y-coordinate of the new location. 577 | */ 578 | moveLabel(egdeState: mxCellState, x: number, y: number): void; 579 | 580 | /** 581 | * Changes the terminal or terminal point of the given edge in the graph model. 582 | * @param {mxCell} edge mxCell that represents the edge to be reconnected. 583 | * @param {mxCell} terminal mxCell that represents the new terminal 584 | * @param {boolean} isSource Boolean indicating if the new terminal is the source or target terminal 585 | * @param {boolean} isClone Boolean indicating if the new connection should be a clone of the old edge 586 | * @param {mxMouseEvent} me mxMouseEvent that contains the mouse up event 587 | */ 588 | connect(edge: mxCell, terminal: mxCell, isSource: boolean, isClone: boolean, me: mxMouseEvent): mxCell; 589 | 590 | /** 591 | * Changes the terminal point of the given edge. 592 | * @param {mxCell} edge 593 | * @param {mxPoint} point 594 | * @param {boolean} isSource 595 | * @param {any} clone 596 | */ 597 | changeTerminalPoint(edge: mxCell, point: mxPoint, isSource: boolean, clone: any): void; 598 | 599 | /** 600 | * Changes the control points of the given edge in the graph model. 601 | * @param {mxCell} edge 602 | * @param {mxPoint[]} points 603 | * @param {any} clone 604 | */ 605 | changePoints(edge: mxCell, points: mxPoint[], clone: any): void; 606 | 607 | /** 608 | * Adds a control point for the given state and event. 609 | * @param {mxCellState} state 610 | * @param {mxEvent} evt 611 | */ 612 | addPoint(state: mxCellState, evt: mxEvent): void; 613 | 614 | /** 615 | * Adds a control point at the given point. 616 | * @param {mxCellState} state 617 | * @param {number} x 618 | * @param {number} y 619 | */ 620 | addPointAt(state: mxCellState, x: number, y: number): void; 621 | 622 | /** 623 | * Removes the control point at the given index from the given state 624 | * @param {mxCellState} state 625 | * @param {number} index 626 | */ 627 | removePoint(state: mxCellState, index: number): void; 628 | 629 | /** 630 | * Returns the fillcolor for the handle at the given index. 631 | * @param {number} index 632 | */ 633 | getHandleFillColor(index: number): string; 634 | 635 | /** 636 | * Redraws the preview, and the bends- and label control points. 637 | */ 638 | redraw(): void; 639 | 640 | /** 641 | * Redraws the handles. 642 | */ 643 | redrawHandles(): void; 644 | 645 | /** 646 | * Shortcut to . 647 | */ 648 | hideHandles(): void; 649 | 650 | /** 651 | * Updates and redraws the inner bends 652 | * @param {mxPoint} p0 mxPoint that represents the location of the first point 653 | * @param {mxPoint} pe mxPoint that represents the location of the last point 654 | */ 655 | redrawInnerBends(p0: mxPoint, pe: mxPoint): void; 656 | 657 | /** 658 | * Checks if the label handle intersects the given bounds and moves it if it intersects 659 | * @param b 660 | */ 661 | checkLabelHandle(b): any; 662 | 663 | /** 664 | * Redraws the preview. 665 | */ 666 | drawPreview(): void; 667 | 668 | /** 669 | * Refreshes the bends of this handler. 670 | */ 671 | refresh(): void; 672 | 673 | /** 674 | * Destroys all elements in bends. 675 | */ 676 | destroyBends(): void; 677 | 678 | /** 679 | * Destroys the handler and all its resources and DOM nodes. This does normally not need to be called as 680 | * handlers are destroyed automatically when the corresponding cell is deselected. 681 | */ 682 | destroy(): void; 683 | 684 | /** 685 | * @private 686 | */ 687 | isSource: boolean; 688 | } 689 | 690 | declare class mxEdgeSegmentHandler extends mxEdgeHandler { 691 | getPreviewPoints(point); 692 | createBends(); 693 | redraw(); 694 | refresh(); 695 | redrawInnerBends(p0, pe); 696 | changePoints(edge, points); 697 | } 698 | 699 | declare class mxElbowEdgeHandler extends mxEdgeHandler { 700 | flipEnabled; 701 | doubleClickOrientationResource; 702 | createBends(); 703 | createVirtualBend(); 704 | getCursorForBend(); 705 | getTooltipForNode(node); 706 | convertPoint(point, gridEnabled); 707 | redrawInnerBends(p0, pe); 708 | } 709 | 710 | declare module mxSelectionCellsHandler { 711 | interface EventHandler extends Util.EventHandler { 712 | (sender: mxSelectionCellsHandler, state: mxEventObject): any; 713 | } 714 | } 715 | declare class mxSelectionCellsHandler extends mxEventSource { 716 | constructor(graph: mxGraph); 717 | /** 718 | * Binds the specified function to the given event name. If no event name is given, then the listener 719 | * is registered for all events. 720 | * The parameters of the listener are the sender and an mxEventObject. 721 | */ 722 | addListener(name: any, func: mxSelectionCellsHandler.EventHandler): void; 723 | 724 | getHandler(cell: mxCell); 725 | 726 | handlers: mxDictionary; 727 | 728 | } 729 | 730 | declare class mxVertexHandler { 731 | /** Event handler for resizing cells. This handler is automatically created in mxGraph.createHandler. */ 732 | constructor(state: mxCellState); 733 | graph; 734 | state; 735 | singleSizer; 736 | index; 737 | allowHandleBoundsCheck; 738 | handleImage; 739 | tolerance; 740 | rotationEnabled; 741 | rotationRaster; 742 | livePreview; 743 | manageSizers; 744 | constrainGroupByChildren; 745 | init(); 746 | updateMinBounds(); 747 | getSelectionBounds(state); 748 | createSelectionShape(bounds); 749 | getSelectionColor(); 750 | getSelectionStrokeWidth(); 751 | isSelectionDashed(); 752 | createSizer(cursor, index, size, fillColor); 753 | isSizerVisible(index); 754 | createSizerShape(bounds, index, fillColor); 755 | moveSizerTo(shape, x, y); 756 | getHandleForEvent(me); 757 | mouseDown(sender, me); 758 | start(x, y, index); 759 | hideSizers(); 760 | checkTolerance(me); 761 | mouseMove(sender, me); 762 | mouseUp(sender, me); 763 | rotateCell(cell, delta); 764 | reset(); 765 | resizeCell(cell, dx, dy, index, gridEnabled); 766 | moveChildren(cell, dx, dy); 767 | union(bounds, dx, dy, index, gridEnabled, scale, tr); 768 | union(bounds, dx, dy, index, gridEnabled, scale, tr); 769 | union(bounds, dx, dy, index, gridEnabled, scale, tr); 770 | redraw(); 771 | redrawHandles(); 772 | redrawHandles(); 773 | drawPreview(); 774 | destroy(); 775 | } 776 | 777 | /****************** Handler end **************/ -------------------------------------------------------------------------------- /Model.d.ts: -------------------------------------------------------------------------------- 1 |  2 | /****************** Model **************/ 3 | 4 | declare class mxCell { 5 | 6 | id: any; 7 | value; 8 | geometry; 9 | style; 10 | vertex; 11 | edge; 12 | connectable; 13 | visible; 14 | collapsed; 15 | parent; 16 | source; 17 | target; 18 | children; 19 | edges; 20 | mxTransient; 21 | getId(); 22 | setId(id); 23 | getValue(); 24 | setValue(value); 25 | valueChanged(newValue); 26 | getGeometry(); 27 | setGeometry(geometry); 28 | getStyle(); 29 | setStyle(style); 30 | isVertex(); 31 | setVertex(vertex); 32 | isEdge(); 33 | setEdge(edge); 34 | isConnectable(); 35 | setConnectable(connectable); 36 | isVisible(); 37 | setVisible(visible); 38 | isCollapsed(); 39 | setCollapsed(collapsed); 40 | getParent(); 41 | setParent(parent); 42 | getTerminal(source); 43 | setTerminal(terminal, isSource); 44 | getChildCount(); 45 | getIndex(child); 46 | getChildAt(index); 47 | insert(child, index); 48 | remove(index); 49 | removeFromParent(); 50 | getEdgeCount(); 51 | getEdgeIndex(edge); 52 | getEdgeAt(index); 53 | insertEdge(edge, isOutgoing); 54 | removeEdge(edge, isOutgoing); 55 | removeFromTerminal(isSource); 56 | getAttribute(name, defaultValue); 57 | setAttribute(name, value); 58 | 59 | /** 60 | * Returns a clone of the cell. Uses cloneValue to clone the user object. All fields in mxTransient are ignored during the cloning. 61 | */ 62 | clone(): mxCell; 63 | 64 | cloneValue(); 65 | } 66 | 67 | /****************** Model end **************/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mxgraph-typescript-definitions 2 | 3 | Typescript definitions for mxgraph library. Is anyone need? star this or email me for collaboration. 4 | 5 | Definitions devided to modules equal to official api documentation's packages: 6 | https://jgraph.github.io/mxgraph/docs/js-api/files/index-txt.html 7 | 8 | - Each class has its "declare class mxEvent {}" 9 | - Interfaces of class members should be in module: 10 | module mxEvent { 11 | interface SomeInterface { } 12 | } 13 | - Common package interfaces should be in module, named by package: 14 | module Util { 15 | interface CommonUtilInterface { } 16 | } 17 | 18 | Now definitions are poor. A lot of types and empty classes. Feel free to get some donkey work typing 80000 lines of code. 19 | -------------------------------------------------------------------------------- /Shape.d.ts: -------------------------------------------------------------------------------- 1 |  2 | /****************** Shape **************/ 3 | 4 | declare class mxRectangleShape { 5 | 6 | } 7 | 8 | declare class mxShape { 9 | 10 | } 11 | 12 | /****************** Shape end **************/ -------------------------------------------------------------------------------- /Util.d.ts: -------------------------------------------------------------------------------- 1 |  2 | /****************** Util **************/ 3 | 4 | /** Common interfaces for Utils */ 5 | declare module Util { 6 | 7 | /** Common handler for addListener of EventSource */ 8 | interface EventHandler { 9 | (sender: any, state: any); 10 | } 11 | 12 | } 13 | 14 | /** 15 | * The mxEventObject is a wrapper for all properties of a single event. Additionally, it also offers functions 16 | * to consume the event and check if it was consumed as follows: 17 | */ 18 | declare class mxEventObject { 19 | constructor(name: string); 20 | 21 | /** Holds the name. */ 22 | name: string; 23 | 24 | /** Holds the properties as an associative array. */ 25 | properties: any; 26 | 27 | /** Returns name */ 28 | getName: () => string; 29 | 30 | /** Returns the property for the given key. */ 31 | getProperty: (key: string) => any; 32 | } 33 | 34 | /** 35 | * A wrapper class for an associative array with object keys. Note: This implementation uses to 36 | * turn object keys into strings. 37 | */ 38 | declare class mxDictionary { 39 | 40 | /** Stores the (key, value) pairs in this dictionary. */ 41 | map: any; 42 | 43 | /** 44 | * Returns the value for the given key. 45 | * @param key 46 | */ 47 | get: (key: any) => any; 48 | 49 | /** 50 | * Stores the value under the given key and returns the previous value for that key. 51 | * @param key 52 | * @param value 53 | */ 54 | put: (key: any, value: any) => any; 55 | 56 | /** Returns all keys as an array. */ 57 | getKeys: () => string[]; 58 | /** Returns all values as an array. */ 59 | getValues: () => string[]; 60 | } 61 | 62 | 63 | 64 | 65 | /** 66 | * Base class for objects that dispatch named events. To create a subclass that inherits from mxEventSource, the following code is used. 67 | */ 68 | declare class mxEventSource { 69 | 70 | /** 71 | * Binds the specified function to the given event name. If no event name is given, then the listener 72 | * is registered for all events. 73 | * The parameters of the listener are the sender and an mxEventObject. 74 | */ 75 | addListener(name: any, func: Util.EventHandler); 76 | 77 | } 78 | 79 | /** 80 | * Encapsulates the URL, width and height of an image. 81 | */ 82 | declare class mxImage { 83 | 84 | /** Encapsulates the URL, width and height of an image. */ 85 | constructor(src: string, width: number, height: number); 86 | 87 | } 88 | 89 | 90 | /** 91 | * Cross-browser DOM event support 92 | */ 93 | declare class mxEvent { 94 | static ADD: any; 95 | static REMOVE: any; 96 | } 97 | 98 | declare class mxMouseEvent { 99 | consumed; 100 | evt; 101 | graphX; 102 | graphY; 103 | state; 104 | getEvent(); 105 | getSource(); 106 | isSource(shape); 107 | getX(); 108 | getY(); 109 | getGraphX(); 110 | getGraphY(); 111 | getState(); 112 | getCell(); 113 | isPopupTrigger(); 114 | isConsumed(); 115 | consume(preventDefault); 116 | } 117 | 118 | 119 | declare class mxPoint { 120 | 121 | /** Constructs a new point for the optional x and y coordinates. If no coordinates are given, then the default values for x and y are used. */ 122 | constructor(x: number, y: number); 123 | 124 | x: number; 125 | y: number; 126 | 127 | /** 128 | * Returns true if the given object equals this point. 129 | * @param obj 130 | */ 131 | equals(obj: any): boolean; 132 | 133 | clone(); 134 | 135 | } 136 | 137 | /****************** Util end **************/ 138 | -------------------------------------------------------------------------------- /View.d.ts: -------------------------------------------------------------------------------- 1 |  2 | /****************** View **************/ 3 | 4 | declare class mxCellState { 5 | 6 | cell: any; 7 | 8 | } 9 | 10 | declare class mxEdgeStyle { 11 | 12 | /** Implements an entity relation style for edges (as used in database schema diagrams). At the time 13 | * the function is called, the result array contains a placeholder (null) for the first absolute point, 14 | * that is, the point where the edge and source terminal are connected. The implementation of the style 15 | * then adds all intermediate waypoints except for the last point, that is, the connection point between 16 | * the edge and the target terminal. The first ant the last point in the result array are then replaced 17 | * with mxPoints that take into account the terminal’s perimeter and next point on the edge. 18 | */ 19 | static EntityRelation(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 20 | 21 | /** Implements a self-reference, aka. loop. */ 22 | static Loop(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 23 | 24 | /** Uses either SideToSide or TopToBottom depending on the horizontal flag in the cell style. 25 | * SideToSide is used if horizontal is true or unspecified. See EntityRelation for a description of the parameters. 26 | */ 27 | static ElbowConnector(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 28 | 29 | /** Implements a vertical elbow edge. See EntityRelation for a description of the parameters. */ 30 | static SideToSide(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 31 | 32 | /** Implements a horizontal elbow edge. See EntityRelation for a description of the parameters */ 33 | static TopToBottom(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 34 | 35 | /** Implements an orthogonal edge style. Use as an interactive handler for this style. */ 36 | static SegmentConnector(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 37 | 38 | /** Implements a local orthogonal router between the given cells. */ 39 | static OrthConnector(state: mxCellState, source: mxCell, target: mxCell, points: mxPoint[], result: any): any; 40 | 41 | } 42 | 43 | 44 | /****************** View end **************/ 45 | -------------------------------------------------------------------------------- /mxGraph.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for mxGraph 2.3.0.2 2 | // Project: https://www.jgraph.com/ 3 | // Definitions by: George Kiselev 4 | // Definitions: https://github.com/gooddaytoday 5 | 6 | /* 7 | 8 | Definitions devided to modules equal to official api documentation's packages: 9 | https://jgraph.github.io/mxgraph/docs/js-api/files/index-txt.html 10 | 11 | - Each class has its "declare class mxEvent {}" 12 | - Interfaces of class members should be in module: 13 | module mxEvent { 14 | interface SomeInterface { } 15 | } 16 | - Common package interfaces should be in module, named by package: 17 | module Util { 18 | interface CommonUtilInterface { } 19 | } 20 | 21 | Now definitions are poor. A lot of types and empty classes. Feel free to get some donkey work. 22 | 23 | */ 24 | 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | 31 | 32 | declare class mxGraph { 33 | 34 | mouseListeners; 35 | isMouseDown; 36 | model; 37 | view; 38 | stylesheet; 39 | selectionModel; 40 | cellEditor; 41 | cellRenderer; 42 | multiplicities; 43 | renderHint; 44 | dialect; 45 | gridSize; 46 | gridEnabled; 47 | portsEnabled; 48 | nativeDblClickEnabled; 49 | doubleTapEnabled; 50 | doubleTapTimeout; 51 | doubleTapTolerance; 52 | lastTouchY; 53 | lastTouchTime; 54 | tapAndHoldEnabled; 55 | tapAndHoldDelay; 56 | tapAndHoldInProgress; 57 | tapAndHoldValid; 58 | initialTouchX; 59 | initialTouchY; 60 | tolerance; 61 | defaultOverlap; 62 | defaultParent; 63 | alternateEdgeStyle; 64 | backgroundImage; 65 | pageVisible; 66 | pageBreaksVisible; 67 | pageBreakColor; 68 | pageBreakDashed; 69 | minPageBreakDist; 70 | preferPageSize; 71 | pageFormat; 72 | pageScale; 73 | enabled; 74 | escapeEnabled; 75 | invokesStopCellEditing; 76 | enterStopsCellEditing; 77 | useScrollbarsForPanning; 78 | exportEnabled; 79 | importEnabled; 80 | cellsLocked; 81 | cellsCloneable; 82 | foldingEnabled; 83 | cellsEditable; 84 | cellsDeletable; 85 | cellsMovable; 86 | edgeLabelsMovable; 87 | vertexLabelsMovable; 88 | dropEnabled; 89 | splitEnabled; 90 | cellsResizable; 91 | cellsBendable; 92 | cellsSelectable; 93 | cellsDisconnectable; 94 | autoSizeCells; 95 | autoSizeCellsOnAdd; 96 | autoScroll; 97 | timerAutoScroll; 98 | allowAutoPanning; 99 | ignoreScrollbars; 100 | autoExtend; 101 | maximumGraphBounds; 102 | minimumGraphSize; 103 | minimumContainerSize; 104 | maximumContainerSize; 105 | resizeContainer; 106 | border; 107 | keepEdgesInForeground; 108 | allowNegativeCoordinates; 109 | constrainChildren; 110 | constrainChildrenOnResize; 111 | extendParents; 112 | extendParentsOnAdd; 113 | extendParentsOnMove; 114 | recursiveResize; 115 | collapseToPreferredSize; 116 | zoomFactor; 117 | keepSelectionVisibleOnZoom; 118 | centerZoom; 119 | resetViewOnRootChange; 120 | resetEdgesOnResize; 121 | resetEdgesOnMove; 122 | resetEdgesOnConnect; 123 | allowLoops; 124 | defaultLoopStyle; 125 | multigraph; 126 | connectableEdges; 127 | allowDanglingEdges; 128 | cloneInvalidEdges; 129 | disconnectOnMove; 130 | labelsVisible; 131 | htmlLabels; 132 | swimlaneSelectionEnabled; 133 | swimlaneNesting; 134 | swimlaneIndicatorColorAttribute; 135 | imageBundles; 136 | minFitScale; 137 | maxFitScale; 138 | panDx; 139 | panDy; 140 | collapsedImage; 141 | expandedImage; 142 | warningImage; 143 | alreadyConnectedResource; 144 | containsValidationErrorsResource; 145 | collapseExpandResource; 146 | getTooltipForCell(cell); 147 | init(container); 148 | createHandlers(container); 149 | createSelectionModel(); 150 | createStylesheet(); 151 | createGraphView(); 152 | createCellRenderer(); 153 | createCellEditor(); 154 | getModel(); 155 | getView(); 156 | getStylesheet(); 157 | setStylesheet(stylesheet); 158 | getSelectionModel(); 159 | setSelectionModel(selectionModel); 160 | getSelectionCellsForChanges(changes); 161 | graphModelChanged(changes); 162 | getRemovedCellsForChanges(changes); 163 | processChange(change); 164 | removeStateForCell(cell); 165 | addCellOverlay(cell, overlay); 166 | getCellOverlays(cell); 167 | removeCellOverlay(cell, overlay); 168 | removeCellOverlays(cell); 169 | clearCellOverlays(cell); 170 | setCellWarning(cell, warning, img, isSelect); 171 | startEditing(evt); 172 | startEditingAtCell(cell, evt); 173 | getEditingValue(cell, evt); 174 | stopEditing(cancel); 175 | labelChanged(cell, value, evt); 176 | cellLabelChanged(cell, value, autoSize); 177 | escape(evt); 178 | click(me); 179 | dblClick(evt, cell); 180 | tapAndHold(me); 181 | scrollPointToVisible(x, y, extend, border); 182 | createPanningManager(); 183 | getBorderSizes(); 184 | getPreferredPageSize(bounds, width, height); 185 | sizeDidChange(); 186 | doResizeContainer(width, height); 187 | updatePageBreaks(visible, width, height); 188 | getCellStyle(cell); 189 | postProcessCellStyle(style); 190 | setCellStyle(style, cells); 191 | toggleCellStyle(key, defaultValue, cell); 192 | toggleCellStyles(key, defaultValue, cells); 193 | setCellStyles(key, value, cells); 194 | toggleCellStyleFlags(key, flag, cells); 195 | setCellStyleFlags(key, flag, value, cells); 196 | alignCells(align, cells, param); 197 | flipEdge(edge); 198 | addImageBundle(bundle); 199 | removeImageBundle(bundle); 200 | getImageFromBundles(key); 201 | orderCells(back, cells); 202 | cellsOrdered(cells, back); 203 | groupCells(group, border, cells); 204 | getCellsForGroup(cells); 205 | getBoundsForGroup(group, children, border); 206 | createGroupCell(cells); 207 | ungroupCells(cells); 208 | removeCellsFromParent(cells); 209 | updateGroupBounds(cells, border, moveGroup); 210 | cloneCells(cells, allowInvalidEdges); 211 | insertEdge(parent, id, value, source, target, style); 212 | createEdge(parent, id, value, source, target, style); 213 | addEdge(edge, parent, source, target, index); 214 | addCell(cell, parent, index, source, target); 215 | addCells(cells, parent, index, source, target); 216 | cellsAdded(cells, parent, index, source, target, absolute, constrain); 217 | autoSizeCell(cell, recurse); 218 | removeCells(cells, includeEdges); 219 | cellsRemoved(cells); 220 | splitEdge(edge, cells, newEdge, dx, dy); 221 | toggleCells(show, cells, includeEdges); 222 | cellsToggled(cells, show); 223 | foldCells(collapse, recurse, cells, checkFoldable); 224 | cellsFolded(cells, collapse, recurse, checkFoldable); 225 | swapBounds(cell, willCollapse); 226 | updateAlternateBounds(cell, geo, willCollapse); 227 | addAllEdges(cells); 228 | getAllEdges(cells); 229 | updateCellSize(cell, ignoreChildren); 230 | cellSizeUpdated(cell, ignoreChildren); 231 | getPreferredSizeForCell(cell); 232 | resizeCell(cell, bounds, recurse); 233 | resizeCells(cells, bounds, recurse); 234 | cellsResized(cells, bounds, recurse); 235 | cellResized(cell, bounds, ignoreRelative, recurse); 236 | resizeChildCells(cell, newGeo); 237 | constrainChildCells(cell); 238 | scaleCell(cell, dx, dy, recurse); 239 | extendParent(cell); 240 | importCells(cells, dx, dy, target, evt); 241 | moveCells(cells, dx, dy, clone, target, evt); 242 | cellsMoved(cells, dx, dy, disconnect, constrain, extend); 243 | translateCell(cell, dx, dy); 244 | getCellContainmentArea(cell); 245 | getMaximumGraphBounds(); 246 | constrainChild(cell); 247 | resetEdges(cells); 248 | resetEdge(edge); 249 | getAllConnectionConstraints(terminal, source); 250 | getConnectionConstraint(edge, terminal, source); 251 | setConnectionConstraint(edge, terminal, source, constraint); 252 | getConnectionPoint(vertex, constraint); 253 | connectCell(edge, terminal, source, constraint); 254 | cellConnected(edge, terminal, source, constraint); 255 | disconnectGraph(cells); 256 | getCurrentRoot(); 257 | getTranslateForRoot(cell); 258 | isPort(cell); 259 | getTerminalForPort(cell, source); 260 | getChildOffsetForCell(cell); 261 | enterGroup(cell); 262 | exitGroup(); 263 | home(); 264 | isValidRoot(cell); 265 | getGraphBounds(); 266 | getCellBounds(cell, includeEdges, includeDescendants); 267 | getBoundingBoxFromGeometry(cells, includeEdges); 268 | refresh(cell); 269 | snap(value); 270 | panGraph(dx, dy); 271 | zoomIn(); 272 | zoomOut(); 273 | zoomActual(); 274 | zoomTo(scale, center); 275 | zoom(factor, center); 276 | zoomToRect(rect); 277 | fit(border, keepOrigin); 278 | scrollCellToVisible(cell, center); 279 | scrollRectToVisible(rect); 280 | getCellGeometry(cell); 281 | isCellVisible(cell); 282 | isCellCollapsed(cell); 283 | isCellConnectable(cell); 284 | isOrthogonal(edge); 285 | isLoop(state); 286 | isCloneEvent(evt); 287 | isToggleEvent(evt); 288 | isGridEnabledEvent(evt); 289 | isConstrainedEvent(evt); 290 | validationAlert(message); 291 | isEdgeValid(edge, source, target); 292 | getEdgeValidationError(edge, source, target); 293 | validateEdge(edge, source, target); 294 | validateGraph(cell, context); 295 | getCellValidationError(cell); 296 | validateCell(cell, context); 297 | getBackgroundImage(); 298 | setBackgroundImage(image); 299 | getFoldingImage(state); 300 | convertValueToString(cell); 301 | getLabel(cell); 302 | isHtmlLabel(cell); 303 | isHtmlLabels(); 304 | setHtmlLabels(value); 305 | isWrapping(cell); 306 | isLabelClipped(cell); 307 | getTooltip(state, node, x, y); 308 | getTooltipForCell(cell); 309 | getCursorForCell(cell); 310 | getStartSize(swimlane); 311 | getImage(state); 312 | getVerticalAlign(state); 313 | getIndicatorColor(state); 314 | getIndicatorGradientColor(state); 315 | getIndicatorShape(state); 316 | getIndicatorImage(state); 317 | getBorder(); 318 | setBorder(value); 319 | isResizeContainer(); 320 | setResizeContainer(value); 321 | isEnabled(); 322 | setEnabled(value); 323 | isEscapeEnabled(); 324 | setEscapeEnabled(value); 325 | isInvokesStopCellEditing(); 326 | setInvokesStopCellEditing(value); 327 | isEnterStopsCellEditing(); 328 | setEnterStopsCellEditing(value); 329 | isCellLocked(cell); 330 | isCellsLocked(); 331 | setCellsLocked(value); 332 | getCloneableCells(cells); 333 | isCellCloneable(cell); 334 | isCellsCloneable(); 335 | setCellsCloneable(value); 336 | getExportableCells(cells); 337 | canExportCell(cell); 338 | getImportableCells(cells); 339 | canImportCell(cell); 340 | isCellSelectable(cell); 341 | isCellSelectable(cell); 342 | isCellsSelectable(); 343 | setCellsSelectable(value); 344 | getDeletableCells(cells); 345 | isCellDeletable(cell); 346 | isCellsDeletable(); 347 | setCellsDeletable(value); 348 | isLabelMovable(cell); 349 | isCellRotatable(cell); 350 | getMovableCells(cells); 351 | isCellMovable(cell); 352 | isCellsMovable(); 353 | setCellsMovable(value); 354 | isGridEnabled(); 355 | setGridEnabled(value); 356 | isPortsEnabled(); 357 | setPortsEnabled(value); 358 | getGridSize(); 359 | setGridSize(value); 360 | getTolerance(); 361 | setTolerance(value); 362 | isVertexLabelsMovable(); 363 | setVertexLabelsMovable(value); 364 | isEdgeLabelsMovable(); 365 | setEdgeLabelsMovable(value); 366 | isSwimlaneNesting(); 367 | setSwimlaneNesting(value); 368 | isSwimlaneSelectionEnabled(); 369 | setSwimlaneSelectionEnabled(value); 370 | isMultigraph(); 371 | setMultigraph(value); 372 | isAllowLoops(); 373 | setAllowDanglingEdges(value); 374 | isAllowDanglingEdges(); 375 | setConnectableEdges(value); 376 | isConnectableEdges(); 377 | setCloneInvalidEdges(value); 378 | isCloneInvalidEdges(); 379 | setAllowLoops(value); 380 | isDisconnectOnMove(); 381 | setDisconnectOnMove(value); 382 | isDropEnabled(); 383 | setDropEnabled(value); 384 | isSplitEnabled(); 385 | setSplitEnabled(value); 386 | isCellResizable(cell); 387 | isCellsResizable(); 388 | setCellsResizable(value); 389 | isTerminalPointMovable(cell, source); 390 | isCellBendable(cell); 391 | isCellsBendable(); 392 | setCellsBendable(value); 393 | isCellEditable(cell); 394 | isCellsEditable(); 395 | setCellsEditable(value); 396 | isCellDisconnectable(cell, terminal, source); 397 | isCellsDisconnectable(); 398 | setCellsDisconnectable(value); 399 | isValidSource(cell); 400 | isValidTarget(cell); 401 | isValidConnection(source, target); 402 | setConnectable(connectable); 403 | isConnectable(connectable); 404 | setPanning(enabled); 405 | isEditing(cell); 406 | isAutoSizeCell(cell); 407 | isAutoSizeCells(); 408 | setAutoSizeCells(value); 409 | isExtendParent(cell); 410 | isExtendParents(); 411 | setExtendParents(value); 412 | isExtendParentsOnAdd(); 413 | setExtendParentsOnAdd(value); 414 | isExtendParentsOnMove(); 415 | setExtendParentsOnMove(value); 416 | isRecursiveResize(); 417 | setRecursiveResize(value); 418 | isConstrainChild(cell); 419 | isConstrainChildren(); 420 | setConstrainChildrenOnResize(value); 421 | isConstrainChildrenOnResize(); 422 | setConstrainChildren(value); 423 | isAllowNegativeCoordinates(); 424 | setAllowNegativeCoordinates(value); 425 | getOverlap(cell); 426 | isAllowOverlapParent(cell); 427 | getFoldableCells(cells, collapse); 428 | isCellFoldable(cell, collapse); 429 | isValidDropTarget(cell, cells, evt); 430 | isSplitTarget(target, cells, evt); 431 | getDropTarget(cells, evt, cell); 432 | getDefaultParent(); 433 | setDefaultParent(cell); 434 | getSwimlane(cell); 435 | getCellAt(x, y, parent, vertices, edges); 436 | intersects(state, x, y); 437 | hitsSwimlaneContent(swimlane, x, y); 438 | getChildVertices(parent); 439 | getChildEdges(parent); 440 | getChildCells(parent, vertices, edges); 441 | getConnections(cell, parent); 442 | getIncomingEdges(cell, parent); 443 | getOutgoingEdges(cell, parent); 444 | getEdges(cell, parent, incoming, outgoing, includeLoops, recurse); 445 | isValidAncestor(cell, parent, recurse); 446 | getOpposites(edges, terminal, sources, targets); 447 | getEdgesBetween(source, target, directed); 448 | getPointForEvent(evt, addOffset); 449 | getCells(x, y, width, height, parent, result); 450 | getCellsBeyond(x0, y0, parent, rightHalfpane, bottomHalfpane); 451 | findTreeRoots(parent, isolate, invert); 452 | traverse(vertex, directed, func, edge, visited); 453 | isCellSelected(cell); 454 | isSelectionEmpty(); 455 | clearSelection(); 456 | getSelectionCount(); 457 | getSelectionCell(); 458 | getSelectionCells(); 459 | setSelectionCell(cell); 460 | setSelectionCells(cells); 461 | addSelectionCell(cell); 462 | addSelectionCells(cells); 463 | removeSelectionCell(cell); 464 | removeSelectionCells(cells); 465 | selectRegion(rect, evt); 466 | selectNextCell(); 467 | selectPreviousCell(); 468 | selectParentCell(); 469 | selectChildCell(); 470 | selectCell(isNext, isParent, isChild); 471 | selectAll(parent); 472 | selectVertices(parent); 473 | selectEdges(parent); 474 | selectCells(vertices, edges, parent); 475 | selectCellForEvent(cell, evt); 476 | selectCellsForEvent(cells, evt); 477 | createHandler(state: mxCellState); 478 | addMouseListener(listener); 479 | removeMouseListener(listener); 480 | updateMouseEvent(me); 481 | getStateForTouchEvent(evt); 482 | isEventIgnored(evtName, me, sender); 483 | isSyntheticEventIgnored(evtName, me, sender); 484 | isEventSourceIgnored(evtName, me); 485 | fireMouseEvent(evtName, me, sender); 486 | fireGestureEvent(evt, cell); 487 | destroy(); 488 | 489 | } --------------------------------------------------------------------------------