fixed import and init errors

development
mcyph 2021-03-21 18:00:50 +11:00
parent b257b5c5c9
commit 473361e910
9 changed files with 27 additions and 17 deletions

View File

@ -198,7 +198,7 @@ class mxPopupMenuHandler extends mxPopupMenu {
this.graph.removeListener(this.gestureHandler);
// Supercall
destroy.apply(this);
super.destroy();
};
}

View File

@ -2,8 +2,6 @@
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
*/
import mxResources from "./util/mxResources";
let mxClient = {
/**
* Class: mxClient
@ -496,4 +494,5 @@ let mxClient = {
}
};
let mxResources = require("./util/mxResources");
export default mxClient;

View File

@ -3,16 +3,8 @@
* Copyright (c) 2006-2015, Gaudenz Alder
* Updated to ES9 syntax by David Morrissey 2021
*/
/**
* Class: mxDictionary
*
* A wrapper class for an associative array with object keys. Note: This
* implementation uses <mxObjectIdentitiy> to turn object keys into strings.
*
* Constructor: mxEventSource
*
* Constructs a new dictionary which allows object to be used as keys.
*/
import mxObjectIdentity from "./mxObjectIdentity";
class mxDictionary {
/**
@ -22,6 +14,16 @@ class mxDictionary {
*/
map = null;
/**
* Class: mxDictionary
*
* A wrapper class for an associative array with object keys. Note: This
* implementation uses <mxObjectIdentitiy> to turn object keys into strings.
*
* Constructor: mxEventSource
*
* Constructs a new dictionary which allows object to be used as keys.
*/
constructor() {
this.clear();
};

View File

@ -4,6 +4,7 @@
* Updated to ES9 syntax by David Morrissey 2021
*/
import mxMouseEvent from "./mxMouseEvent";
import mxClient from "../mxClient";
// Checks if passive event listeners are supported
// see https://github.com/Modernizr/Modernizr/issues/1894

View File

@ -4,6 +4,8 @@
* Updated to ES9 syntax by David Morrissey 2021
*/
import mxUtils from "./mxUtils";
let mxObjectIdentity = {
/**
* Class: mxObjectIdentity

View File

@ -109,7 +109,7 @@ class mxPopupMenu extends mxEventSource {
*
* Initializes the shapes required for this vertex handler.
*/
init = () => {
init() {
// Adds the inner table
this.table = document.createElement('table');
this.table.className = 'mxPopupMenu';

View File

@ -31,7 +31,7 @@ let mxUtils = {
* resource for this key does not exist then the value is used as
* the title. Default is 'error'.
*/
errorResource: (mxClient.language !== 'none') ? 'error' : '',
errorResource: 'error',
/**
* Variable: closeResource
@ -40,14 +40,14 @@ let mxUtils = {
* resource for this key does not exist then the value is used as
* the label. Default is 'close'.
*/
closeResource: (mxClient.language !== 'none') ? 'close' : '',
closeResource: 'close',
/**
* Variable: errorImage
*
* Defines the image used for error dialogs.
*/
errorImage: mxClient.imageBasePath + '/error.gif',
errorImage: '/error.gif', //mxClient.imageBasePath + '/error.gif',
/**
* Function: removeCursors

View File

@ -7,6 +7,7 @@
import mxUtils from "../util/mxUtils"
import mxRectangle from "../util/mxRectangle";
import mxEvent from "../util/mxEvent";
import mxClient from "../mxClient";
class mxCellEditor {
/**

View File

@ -12,6 +12,11 @@ import mxEventObject from "../util/mxEventObject";
import mxRectangleShape from "../shape/mxRectangleShape";
import mxConstants from "../util/mxConstants";
import mxClient from "../mxClient";
import mxEvent from "../util/mxEvent";
import mxUtils from "../util/mxUtils";
import mxLog from "../util/mxLog";
import mxResources from "../util/mxResources";
import mxCellState from "./mxCellState";
class mxGraphView extends mxEventSource {
EMPTY_POINT = new mxPoint();