From b257b5c5c9e147fe67d05d006b26791da67bee9f Mon Sep 17 00:00:00 2001 From: mcyph <20507948+mcyph@users.noreply.github.com> Date: Sun, 21 Mar 2021 17:46:06 +1100 Subject: [PATCH] fixed import and init errors --- src/mxgraph/handler/mxCellHighlight.js | 2 + src/mxgraph/handler/mxConstraintHandler.js | 4 + src/mxgraph/handler/mxGraphHandler.js | 4 + src/mxgraph/handler/mxPanningHandler.js | 1 + src/mxgraph/handler/mxPopupMenuHandler.js | 4 +- .../handler/mxSelectionCellsHandler.js | 1 + .../atomic_changes/mxCellAttributeChange.js | 62 +++ .../model/atomic_changes/mxChildChange.js | 92 +++++ .../model/atomic_changes/mxCollapseChange.js | 34 ++ .../model/atomic_changes/mxGeometryChange.js | 34 ++ .../model/atomic_changes/mxRootChange.js | 30 ++ .../model/atomic_changes/mxStyleChange.js | 34 ++ .../model/atomic_changes/mxTerminalChange.js | 35 ++ .../model/atomic_changes/mxValueChange.js | 33 ++ .../model/atomic_changes/mxVisibleChange.js | 34 ++ src/mxgraph/model/mxGraphModel.js | 378 +----------------- src/mxgraph/util/mxPopupMenu.js | 2 + src/mxgraph/view/mxGraph.js | 1 + src/mxgraph/view/mxGraphSelectionModel.js | 1 + src/mxgraph/view/mxGraphView.js | 1 + src/mxgraph/view/mxStylesheet.js | 1 + 21 files changed, 423 insertions(+), 365 deletions(-) create mode 100644 src/mxgraph/model/atomic_changes/mxCellAttributeChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxChildChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxCollapseChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxGeometryChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxRootChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxStyleChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxTerminalChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxValueChange.js create mode 100644 src/mxgraph/model/atomic_changes/mxVisibleChange.js diff --git a/src/mxgraph/handler/mxCellHighlight.js b/src/mxgraph/handler/mxCellHighlight.js index 739874046..d0aaa1bd6 100644 --- a/src/mxgraph/handler/mxCellHighlight.js +++ b/src/mxgraph/handler/mxCellHighlight.js @@ -3,6 +3,8 @@ * Copyright (c) 2006-2015, Gaudenz Alder * Updated to ES9 syntax by David Morrissey 2021 */ +import mxConstants from "../util/mxConstants"; +import mxEvent from "../util/mxEvent"; class mxCellHighlight { /** diff --git a/src/mxgraph/handler/mxConstraintHandler.js b/src/mxgraph/handler/mxConstraintHandler.js index 361c9dc89..82c13a35a 100644 --- a/src/mxgraph/handler/mxConstraintHandler.js +++ b/src/mxgraph/handler/mxConstraintHandler.js @@ -3,6 +3,10 @@ * Copyright (c) 2006-2015, Gaudenz Alder * Updated to ES9 syntax by David Morrissey 2021 */ +import mxImage from "../util/mxImage"; +import mxClient from "../mxClient"; +import mxConstants from "../util/mxConstants"; +import mxEvent from "../util/mxEvent"; class mxConstraintHandler { /** diff --git a/src/mxgraph/handler/mxGraphHandler.js b/src/mxgraph/handler/mxGraphHandler.js index 41efdd234..e09e1c889 100644 --- a/src/mxgraph/handler/mxGraphHandler.js +++ b/src/mxgraph/handler/mxGraphHandler.js @@ -4,6 +4,10 @@ * Updated to ES9 syntax by David Morrissey 2021 */ +import mxClient from "../mxClient"; +import mxEvent from "../util/mxEvent"; +import mxUtils from "../util/mxUtils"; + class mxGraphHandler { /** * Variable: graph diff --git a/src/mxgraph/handler/mxPanningHandler.js b/src/mxgraph/handler/mxPanningHandler.js index 523b71f9f..49e1720d5 100644 --- a/src/mxgraph/handler/mxPanningHandler.js +++ b/src/mxgraph/handler/mxPanningHandler.js @@ -6,6 +6,7 @@ import mxEventSource from "../util/mxEventSource"; import mxUtils from "../util/mxUtils"; import mxEventObject from "../util/mxEventObject"; +import mxEvent from "../util/mxEvent"; class mxPanningHandler extends mxEventSource { /** diff --git a/src/mxgraph/handler/mxPopupMenuHandler.js b/src/mxgraph/handler/mxPopupMenuHandler.js index 6c8e99c3e..938de6edd 100644 --- a/src/mxgraph/handler/mxPopupMenuHandler.js +++ b/src/mxgraph/handler/mxPopupMenuHandler.js @@ -4,6 +4,8 @@ * Updated to ES9 syntax by David Morrissey 2021 */ import mxPopupMenu from "../util/mxPopupMenu"; +import mxEvent from "../util/mxEvent"; +import mxUtils from "../util/mxUtils"; class mxPopupMenuHandler extends mxPopupMenu { /** @@ -92,7 +94,7 @@ class mxPopupMenuHandler extends mxPopupMenu { */ init = () => { // Supercall - init.apply(this); + super.init(); // Hides the tooltip if the mouse is over // the context menu diff --git a/src/mxgraph/handler/mxSelectionCellsHandler.js b/src/mxgraph/handler/mxSelectionCellsHandler.js index bd8f6f0cd..b45f4e538 100644 --- a/src/mxgraph/handler/mxSelectionCellsHandler.js +++ b/src/mxgraph/handler/mxSelectionCellsHandler.js @@ -6,6 +6,7 @@ import mxEventSource from "../util/mxEventSource"; import mxDictionary from "../util/mxDictionary"; import mxEventObject from "../util/mxEventObject"; +import mxEvent from "../util/mxEvent"; class mxSelectionCellsHandler extends mxEventSource { /** diff --git a/src/mxgraph/model/atomic_changes/mxCellAttributeChange.js b/src/mxgraph/model/atomic_changes/mxCellAttributeChange.js new file mode 100644 index 000000000..32ee15348 --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxCellAttributeChange.js @@ -0,0 +1,62 @@ +class mxCellAttributeChange { + /** + * Class: mxCellAttributeChange + * + * Action to change the attribute of a cell's user object. + * There is no method on the graph model that uses this + * action. To use the action, you can use the code shown + * in the example below. + * + * Example: + * + * To change the attributeName in the cell's user object + * to attributeValue, use the following code: + * + * (code) + * model.beginUpdate(); + * try + * { + * let edit = new mxCellAttributeChange( + * cell, attributeName, attributeValue); + * model.execute(edit); + * } + * finally + * { + * model.endUpdate(); + * } + * (end) + * + * Constructor: mxCellAttributeChange + * + * Constructs a change of a attribute of the DOM node + * stored as the value of the given . + */ + constructor(cell, attribute, value) { + this.cell = cell; + this.attribute = attribute; + this.value = value; + this.previous = value; + }; + + /** + * Function: execute + * + * Changes the attribute of the cell's user object by + * using . + */ + execute = () => { + if (this.cell != null) { + let tmp = this.cell.getAttribute(this.attribute); + + if (this.previous == null) { + this.cell.value.removeAttribute(this.attribute); + } else { + this.cell.setAttribute(this.attribute, this.previous); + } + + this.previous = tmp; + } + }; +} + +export default mxCellAttributeChange; diff --git a/src/mxgraph/model/atomic_changes/mxChildChange.js b/src/mxgraph/model/atomic_changes/mxChildChange.js new file mode 100644 index 000000000..109408c16 --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxChildChange.js @@ -0,0 +1,92 @@ +class mxChildChange { + /** + * Class: mxChildChange + * + * Action to add or remove a child in a model. + * + * Constructor: mxChildChange + * + * Constructs a change of a child in the + * specified model. + */ + constructor(model, parent, child, index) { + this.model = model; + this.parent = parent; + this.previous = parent; + this.child = child; + this.index = index; + this.previousIndex = index; + }; + + /** + * Function: execute + * + * Changes the parent of using + * and + * removes or restores the cell's + * connections. + */ + execute = () => { + if (this.child != null) { + let tmp = this.model.getParent(this.child); + var tmp2 = (tmp != null) ? tmp.getIndex(this.child) : 0; + + if (this.previous == null) { + this.connect(this.child, false); + } + + tmp = this.model.parentForCellChanged( + this.child, this.previous, this.previousIndex); + + if (this.previous != null) { + this.connect(this.child, true); + } + + this.parent = this.previous; + this.previous = tmp; + this.index = this.previousIndex; + this.previousIndex = tmp2; + } + }; + + /** + * Function: disconnect + * + * Disconnects the given cell recursively from its + * terminals and stores the previous terminal in the + * cell's terminals. + */ + connect = (cell, isConnect) => { + isConnect = (isConnect != null) ? isConnect : true; + + let source = cell.getTerminal(true); + let target = cell.getTerminal(false); + + if (source != null) { + if (isConnect) { + this.model.terminalForCellChanged(cell, source, true); + } else { + this.model.terminalForCellChanged(cell, null, true); + } + } + + if (target != null) { + if (isConnect) { + this.model.terminalForCellChanged(cell, target, false); + } else { + this.model.terminalForCellChanged(cell, null, false); + } + } + + cell.setTerminal(source, true); + cell.setTerminal(target, false); + + let childCount = this.model.getChildCount(cell); + + for (let i = 0; i < childCount; i++) { + this.connect(this.model.getChildAt(cell, i), isConnect); + } + }; +} + +export default mxChildChange; diff --git a/src/mxgraph/model/atomic_changes/mxCollapseChange.js b/src/mxgraph/model/atomic_changes/mxCollapseChange.js new file mode 100644 index 000000000..6a644c62c --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxCollapseChange.js @@ -0,0 +1,34 @@ +class mxCollapseChange { + /** + * Class: mxCollapseChange + * + * Action to change a cell's collapsed state in a model. + * + * Constructor: mxCollapseChange + * + * Constructs a change of a collapsed state in the + * specified model. + */ + constructor(model, cell, collapsed) { + this.model = model; + this.cell = cell; + this.collapsed = collapsed; + this.previous = collapsed; + }; + + /** + * Function: execute + * + * Changes the collapsed state of to using + * . + */ + execute = () => { + if (this.cell != null) { + this.collapsed = this.previous; + this.previous = this.model.collapsedStateForCellChanged( + this.cell, this.previous); + } + }; +} + +export default mxCollapseChange; diff --git a/src/mxgraph/model/atomic_changes/mxGeometryChange.js b/src/mxgraph/model/atomic_changes/mxGeometryChange.js new file mode 100644 index 000000000..63325028e --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxGeometryChange.js @@ -0,0 +1,34 @@ +class mxGeometryChange { + /** + * Class: mxGeometryChange + * + * Action to change a cell's geometry in a model. + * + * Constructor: mxGeometryChange + * + * Constructs a change of a geometry in the + * specified model. + */ + constructor(model, cell, geometry) { + this.model = model; + this.cell = cell; + this.geometry = geometry; + this.previous = geometry; + }; + + /** + * Function: execute + * + * Changes the geometry of ro using + * . + */ + execute = () => { + if (this.cell != null) { + this.geometry = this.previous; + this.previous = this.model.geometryForCellChanged( + this.cell, this.previous); + } + }; +} + +export default mxGeometryChange; diff --git a/src/mxgraph/model/atomic_changes/mxRootChange.js b/src/mxgraph/model/atomic_changes/mxRootChange.js new file mode 100644 index 000000000..a6a2df183 --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxRootChange.js @@ -0,0 +1,30 @@ +class mxRootChange { + /** + * Class: mxRootChange + * + * Action to change the root in a model. + * + * Constructor: mxRootChange + * + * Constructs a change of the root in the + * specified model. + */ + constructor(model, root) { + this.model = model; + this.root = root; + this.previous = root; + }; + + /** + * Function: execute + * + * Carries out a change of the root using + * . + */ + execute = () => { + this.root = this.previous; + this.previous = this.model.rootChanged(this.previous); + }; +} + +export default mxRootChange; diff --git a/src/mxgraph/model/atomic_changes/mxStyleChange.js b/src/mxgraph/model/atomic_changes/mxStyleChange.js new file mode 100644 index 000000000..8d13851ac --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxStyleChange.js @@ -0,0 +1,34 @@ +class mxStyleChange { + /** + * Class: mxStyleChange + * + * Action to change a cell's style in a model. + * + * Constructor: mxStyleChange + * + * Constructs a change of a style in the + * specified model. + */ + constructor(model, cell, style) { + this.model = model; + this.cell = cell; + this.style = style; + this.previous = style; + }; + + /** + * Function: execute + * + * Changes the style of to using + * . + */ + execute = () => { + if (this.cell != null) { + this.style = this.previous; + this.previous = this.model.styleForCellChanged( + this.cell, this.previous); + } + }; +} + +export default mxStyleChange; diff --git a/src/mxgraph/model/atomic_changes/mxTerminalChange.js b/src/mxgraph/model/atomic_changes/mxTerminalChange.js new file mode 100644 index 000000000..3a1bb3ca9 --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxTerminalChange.js @@ -0,0 +1,35 @@ +class mxTerminalChange { + /** + * Class: mxTerminalChange + * + * Action to change a terminal in a model. + * + * Constructor: mxTerminalChange + * + * Constructs a change of a terminal in the + * specified model. + */ + constructor(model, cell, terminal, source) { + this.model = model; + this.cell = cell; + this.terminal = terminal; + this.previous = terminal; + this.source = source; + }; + + /** + * Function: execute + * + * Changes the terminal of to using + * . + */ + execute = () => { + if (this.cell != null) { + this.terminal = this.previous; + this.previous = this.model.terminalForCellChanged( + this.cell, this.previous, this.source); + } + }; +} + +export default mxTerminalChange; diff --git a/src/mxgraph/model/atomic_changes/mxValueChange.js b/src/mxgraph/model/atomic_changes/mxValueChange.js new file mode 100644 index 000000000..9c34fc252 --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxValueChange.js @@ -0,0 +1,33 @@ +class mxValueChange { + /** + * Class: mxValueChange + * + * Action to change a user object in a model. + * + * Constructor: mxValueChange + * + * Constructs a change of a user object in the + * specified model. + */ + constructor(model, cell, value) { + this.model = model; + this.cell = cell; + this.value = value; + this.previous = value; + }; + + /** + * Function: execute + * + * Changes the value of to using + * . + */ + execute = () => { + if (this.cell != null) { + this.value = this.previous; + this.previous = this.model.valueForCellChanged( + this.cell, this.previous); + } + }; +} +export default mxValueChange; diff --git a/src/mxgraph/model/atomic_changes/mxVisibleChange.js b/src/mxgraph/model/atomic_changes/mxVisibleChange.js new file mode 100644 index 000000000..3b14590cd --- /dev/null +++ b/src/mxgraph/model/atomic_changes/mxVisibleChange.js @@ -0,0 +1,34 @@ +class mxVisibleChange { + /** + * Class: mxVisibleChange + * + * Action to change a cell's visible state in a model. + * + * Constructor: mxVisibleChange + * + * Constructs a change of a visible state in the + * specified model. + */ + constructor(model, cell, visible) { + this.model = model; + this.cell = cell; + this.visible = visible; + this.previous = visible; + }; + + /** + * Function: execute + * + * Changes the visible state of to using + * . + */ + execute = () => { + if (this.cell != null) { + this.visible = this.previous; + this.previous = this.model.visibleStateForCellChanged( + this.cell, this.previous); + } + }; +} + +export default mxVisibleChange; diff --git a/src/mxgraph/model/mxGraphModel.js b/src/mxgraph/model/mxGraphModel.js index c7664099c..94cae6b2c 100644 --- a/src/mxgraph/model/mxGraphModel.js +++ b/src/mxgraph/model/mxGraphModel.js @@ -9,6 +9,19 @@ import mxCellPath from "./mxCellPath"; import mxDictionary from "../util/mxDictionary"; import mxObjectIdentity from "../util/mxObjectIdentity"; import mxCell from "./mxCell"; +import mxUtils from "../util/mxUtils"; +import mxEventObject from "../util/mxEventObject"; +import mxEvent from "../util/mxEvent"; + +import mxCellAttributeChange from "./atomic_changes/mxCellAttributeChange"; +import mxChildChange from "./atomic_changes/mxChildChange"; +import mxCollapseChange from "./atomic_changes/mxCollapseChange"; +import mxGeometryChange from "./atomic_changes/mxGeometryChange"; +import mxRootChange from "./atomic_changes/mxRootChange"; +import mxStyleChange from "./atomic_changes/mxStyleChange"; +import mxTerminalChange from "./atomic_changes/mxTerminalChange"; +import mxValueChange from "./atomic_changes/mxValueChange"; +import mxVisibleChange from "./atomic_changes/mxVisibleChange"; class mxGraphModel extends mxEventSource { /** @@ -2099,372 +2112,9 @@ class mxGraphModel extends mxEventSource { this.getChildAt(cell, i), mapping); } }; +} // // Atomic changes // - - /** - * Class: mxRootChange - * - * Action to change the root in a model. - * - * Constructor: mxRootChange - * - * Constructs a change of the root in the - * specified model. - */ - mxRootChange = (model, root) => { - this.model = model; - this.root = root; - this.previous = root; - }; - - /** - * Function: execute - * - * Carries out a change of the root using - * . - */ - execute = () => { - this.root = this.previous; - this.previous = this.model.rootChanged(this.previous); - }; - - /** - * Class: mxChildChange - * - * Action to add or remove a child in a model. - * - * Constructor: mxChildChange - * - * Constructs a change of a child in the - * specified model. - */ - mxChildChange = (model, parent, child, index) => { - this.model = model; - this.parent = parent; - this.previous = parent; - this.child = child; - this.index = index; - this.previousIndex = index; - }; - - /** - * Function: execute - * - * Changes the parent of using - * and - * removes or restores the cell's - * connections. - */ - execute = () => { - if (this.child != null) { - let tmp = this.model.getParent(this.child); - var tmp2 = (tmp != null) ? tmp.getIndex(this.child) : 0; - - if (this.previous == null) { - this.connect(this.child, false); - } - - tmp = this.model.parentForCellChanged( - this.child, this.previous, this.previousIndex); - - if (this.previous != null) { - this.connect(this.child, true); - } - - this.parent = this.previous; - this.previous = tmp; - this.index = this.previousIndex; - this.previousIndex = tmp2; - } - }; - - /** - * Function: disconnect - * - * Disconnects the given cell recursively from its - * terminals and stores the previous terminal in the - * cell's terminals. - */ - connect = (cell, isConnect) => { - isConnect = (isConnect != null) ? isConnect : true; - - let source = cell.getTerminal(true); - let target = cell.getTerminal(false); - - if (source != null) { - if (isConnect) { - this.model.terminalForCellChanged(cell, source, true); - } else { - this.model.terminalForCellChanged(cell, null, true); - } - } - - if (target != null) { - if (isConnect) { - this.model.terminalForCellChanged(cell, target, false); - } else { - this.model.terminalForCellChanged(cell, null, false); - } - } - - cell.setTerminal(source, true); - cell.setTerminal(target, false); - - let childCount = this.model.getChildCount(cell); - - for (let i = 0; i < childCount; i++) { - this.connect(this.model.getChildAt(cell, i), isConnect); - } - }; - - /** - * Class: mxTerminalChange - * - * Action to change a terminal in a model. - * - * Constructor: mxTerminalChange - * - * Constructs a change of a terminal in the - * specified model. - */ - mxTerminalChange = (model, cell, terminal, source) => { - this.model = model; - this.cell = cell; - this.terminal = terminal; - this.previous = terminal; - this.source = source; - }; - - /** - * Function: execute - * - * Changes the terminal of to using - * . - */ - execute = () => { - if (this.cell != null) { - this.terminal = this.previous; - this.previous = this.model.terminalForCellChanged( - this.cell, this.previous, this.source); - } - }; - - /** - * Class: mxValueChange - * - * Action to change a user object in a model. - * - * Constructor: mxValueChange - * - * Constructs a change of a user object in the - * specified model. - */ - mxValueChange = (model, cell, value) => { - this.model = model; - this.cell = cell; - this.value = value; - this.previous = value; - }; - - /** - * Function: execute - * - * Changes the value of to using - * . - */ - execute = () => { - if (this.cell != null) { - this.value = this.previous; - this.previous = this.model.valueForCellChanged( - this.cell, this.previous); - } - }; - - /** - * Class: mxStyleChange - * - * Action to change a cell's style in a model. - * - * Constructor: mxStyleChange - * - * Constructs a change of a style in the - * specified model. - */ - mxStyleChange = (model, cell, style) => { - this.model = model; - this.cell = cell; - this.style = style; - this.previous = style; - }; - - /** - * Function: execute - * - * Changes the style of to using - * . - */ - execute = () => { - if (this.cell != null) { - this.style = this.previous; - this.previous = this.model.styleForCellChanged( - this.cell, this.previous); - } - }; - - /** - * Class: mxGeometryChange - * - * Action to change a cell's geometry in a model. - * - * Constructor: mxGeometryChange - * - * Constructs a change of a geometry in the - * specified model. - */ - mxGeometryChange = (model, cell, geometry) => { - this.model = model; - this.cell = cell; - this.geometry = geometry; - this.previous = geometry; - }; - - /** - * Function: execute - * - * Changes the geometry of ro using - * . - */ - execute = () => { - if (this.cell != null) { - this.geometry = this.previous; - this.previous = this.model.geometryForCellChanged( - this.cell, this.previous); - } - }; - - /** - * Class: mxCollapseChange - * - * Action to change a cell's collapsed state in a model. - * - * Constructor: mxCollapseChange - * - * Constructs a change of a collapsed state in the - * specified model. - */ - mxCollapseChange = (model, cell, collapsed) => { - this.model = model; - this.cell = cell; - this.collapsed = collapsed; - this.previous = collapsed; - }; - - /** - * Function: execute - * - * Changes the collapsed state of to using - * . - */ - execute = () => { - if (this.cell != null) { - this.collapsed = this.previous; - this.previous = this.model.collapsedStateForCellChanged( - this.cell, this.previous); - } - }; - - /** - * Class: mxVisibleChange - * - * Action to change a cell's visible state in a model. - * - * Constructor: mxVisibleChange - * - * Constructs a change of a visible state in the - * specified model. - */ - mxVisibleChange = (model, cell, visible) => { - this.model = model; - this.cell = cell; - this.visible = visible; - this.previous = visible; - }; - - /** - * Function: execute - * - * Changes the visible state of to using - * . - */ - execute = () => { - if (this.cell != null) { - this.visible = this.previous; - this.previous = this.model.visibleStateForCellChanged( - this.cell, this.previous); - } - }; - - /** - * Class: mxCellAttributeChange - * - * Action to change the attribute of a cell's user object. - * There is no method on the graph model that uses this - * action. To use the action, you can use the code shown - * in the example below. - * - * Example: - * - * To change the attributeName in the cell's user object - * to attributeValue, use the following code: - * - * (code) - * model.beginUpdate(); - * try - * { - * let edit = new mxCellAttributeChange( - * cell, attributeName, attributeValue); - * model.execute(edit); - * } - * finally - * { - * model.endUpdate(); - * } - * (end) - * - * Constructor: mxCellAttributeChange - * - * Constructs a change of a attribute of the DOM node - * stored as the value of the given . - */ - mxCellAttributeChange = (cell, attribute, value) => { - this.cell = cell; - this.attribute = attribute; - this.value = value; - this.previous = value; - }; - - /** - * Function: execute - * - * Changes the attribute of the cell's user object by - * using . - */ - execute = () => { - if (this.cell != null) { - let tmp = this.cell.getAttribute(this.attribute); - - if (this.previous == null) { - this.cell.value.removeAttribute(this.attribute); - } else { - this.cell.setAttribute(this.attribute, this.previous); - } - - this.previous = tmp; - } - }; -} - export default mxGraphModel; diff --git a/src/mxgraph/util/mxPopupMenu.js b/src/mxgraph/util/mxPopupMenu.js index 6e5064350..55accad26 100644 --- a/src/mxgraph/util/mxPopupMenu.js +++ b/src/mxgraph/util/mxPopupMenu.js @@ -6,6 +6,8 @@ import mxEventSource from "./mxEventSource"; import mxUtils from "./mxUtils"; import mxEventObject from "./mxEventObject"; +import mxClient from "../mxClient"; +import mxEvent from "./mxEvent"; class mxPopupMenu extends mxEventSource { /** diff --git a/src/mxgraph/view/mxGraph.js b/src/mxgraph/view/mxGraph.js index 12e251258..67da38837 100644 --- a/src/mxgraph/view/mxGraph.js +++ b/src/mxgraph/view/mxGraph.js @@ -37,6 +37,7 @@ import mxResources from "../util/mxResources"; import mxGeometry from "../model/mxGeometry"; import mxCell from "../model/mxCell"; import mxGraphModel from "../model/mxGraphModel"; +import mxStylesheet from "./mxStylesheet"; class mxGraph extends mxEventSource { /** diff --git a/src/mxgraph/view/mxGraphSelectionModel.js b/src/mxgraph/view/mxGraphSelectionModel.js index fedc68cc8..e0fae8ddd 100644 --- a/src/mxgraph/view/mxGraphSelectionModel.js +++ b/src/mxgraph/view/mxGraphSelectionModel.js @@ -7,6 +7,7 @@ import mxUndoableEdit from "../util/mxUndoableEdit"; import mxEventSource from "../util/mxEventSource"; import mxEventObject from "../util/mxEventObject"; +import mxClient from "../mxClient"; class mxGraphSelectionModel extends mxEventSource { /** diff --git a/src/mxgraph/view/mxGraphView.js b/src/mxgraph/view/mxGraphView.js index f72d2415f..65b4afc16 100644 --- a/src/mxgraph/view/mxGraphView.js +++ b/src/mxgraph/view/mxGraphView.js @@ -11,6 +11,7 @@ import mxEventSource from "../util/mxEventSource"; import mxEventObject from "../util/mxEventObject"; import mxRectangleShape from "../shape/mxRectangleShape"; import mxConstants from "../util/mxConstants"; +import mxClient from "../mxClient"; class mxGraphView extends mxEventSource { EMPTY_POINT = new mxPoint(); diff --git a/src/mxgraph/view/mxStylesheet.js b/src/mxgraph/view/mxStylesheet.js index da57f7a2c..179b2f9ac 100644 --- a/src/mxgraph/view/mxStylesheet.js +++ b/src/mxgraph/view/mxStylesheet.js @@ -4,6 +4,7 @@ * Updated to ES9 syntax by David Morrissey 2021 */ import mxConstants from "../util/mxConstants"; +import mxPerimeter from "./mxPerimeter"; class mxStylesheet { /**