From dad45f61ddd0fb522f59e55b371f76f1b4661f1f Mon Sep 17 00:00:00 2001 From: mcyph <20507948+mcyph@users.noreply.github.com> Date: Thu, 25 Mar 2021 11:21:31 +1100 Subject: [PATCH] started integrating more examples into the next.js app --- src/mxgraph/layout/mxCompactTreeLayout.js | 4 + src/mxgraph/shape/mxRhombus.js | 2 + src/mxgraph/util/mxWindow.js | 3 + src/mxgraph/view/mxPerimeter.js | 1 + src/mxgraph/view/mxSwimlaneManager.js | 6 + src/pages/DragSource.js | 2 +- src/pages/Perimeter.js | 185 +++--- src/pages/Permissions.js | 447 +++++++------- src/pages/PortRefs.js | 398 +++++++------ src/pages/RadialTreeLayout.js | 183 +++--- src/pages/Resources.js | 102 ++-- src/pages/SecondLabel.js | 375 ++++++------ src/pages/Shape.js | 207 +++---- src/pages/StandardsMode.js | 111 ---- src/pages/Stencils.js | 683 ++++++++++++---------- src/pages/Stylesheet.js | 267 ++++----- src/pages/Template.js | 54 +- src/pages/Thread.js | 113 ++-- src/pages/Toolbar.js | 317 +++++----- src/pages/index.js | 28 +- 20 files changed, 1669 insertions(+), 1819 deletions(-) delete mode 100644 src/pages/StandardsMode.js diff --git a/src/mxgraph/layout/mxCompactTreeLayout.js b/src/mxgraph/layout/mxCompactTreeLayout.js index 1f4b1f132..e34c2b96a 100644 --- a/src/mxgraph/layout/mxCompactTreeLayout.js +++ b/src/mxgraph/layout/mxCompactTreeLayout.js @@ -7,6 +7,10 @@ import mxDictionary from '../util/mxDictionary'; import mxPoint from '../util/mxPoint'; import mxGraphLayout from './mxGraphLayout'; +import mxCellPath from "../model/mxCellPath"; +import mxRectangle from "../util/mxRectangle"; +import mxUtils from "../util/mxUtils"; +import WeightedCellSorter from "./WeightedCellSorter"; class mxCompactTreeLayout extends mxGraphLayout { /** diff --git a/src/mxgraph/shape/mxRhombus.js b/src/mxgraph/shape/mxRhombus.js index 26ce8f79c..719f2cebb 100644 --- a/src/mxgraph/shape/mxRhombus.js +++ b/src/mxgraph/shape/mxRhombus.js @@ -5,6 +5,8 @@ */ import mxShape from './mxShape'; import mxPoint from '../util/mxPoint'; +import mxUtils from "../util/mxUtils"; +import mxConstants from "../util/mxConstants"; class mxRhombus extends mxShape { /** diff --git a/src/mxgraph/util/mxWindow.js b/src/mxgraph/util/mxWindow.js index 25de418ff..98f57e6d5 100644 --- a/src/mxgraph/util/mxWindow.js +++ b/src/mxgraph/util/mxWindow.js @@ -9,6 +9,9 @@ import mxEventObject from './mxEventObject'; import mxEventSource from './mxEventSource'; import mxUtils from './mxUtils'; import mxEvent from './mxEvent'; +import mxClient from "../mxClient"; +import mxConstants from "./mxConstants"; + class mxWindow extends mxEventSource { /** diff --git a/src/mxgraph/view/mxPerimeter.js b/src/mxgraph/view/mxPerimeter.js index b068afd01..b1b3655a9 100644 --- a/src/mxgraph/view/mxPerimeter.js +++ b/src/mxgraph/view/mxPerimeter.js @@ -6,6 +6,7 @@ import mxUtils from '../util/mxUtils'; import mxPoint from '../util/mxPoint'; +import mxConstants from "../util/mxConstants"; const mxPerimeter = { /** diff --git a/src/mxgraph/view/mxSwimlaneManager.js b/src/mxgraph/view/mxSwimlaneManager.js index 975ea2311..8a001285a 100644 --- a/src/mxgraph/view/mxSwimlaneManager.js +++ b/src/mxgraph/view/mxSwimlaneManager.js @@ -4,6 +4,12 @@ * Updated to ES9 syntax by David Morrissey 2021 */ +import mxEventSource from "../util/mxEventSource"; +import mxUtils from "../util/mxUtils"; +import mxEvent from "../util/mxEvent"; +import mxConstants from "../util/mxConstants"; +import mxRectangle from "../util/mxRectangle"; + class mxSwimlaneManager extends mxEventSource { /** * Variable: graph diff --git a/src/pages/DragSource.js b/src/pages/DragSource.js index 20cbb3a7b..6bcfb36cb 100644 --- a/src/pages/DragSource.js +++ b/src/pages/DragSource.js @@ -123,7 +123,7 @@ class DragSource extends React.Component { const img = mxUtils.createImage('images/icons48/gear.png'); img.style.width = '48px'; img.style.height = '48px'; - document.body.appendChild(img); + this.el.appendChild(img); // Creates the element that is being for the actual preview. const dragElt = document.createElement('div'); diff --git a/src/pages/Perimeter.js b/src/pages/Perimeter.js index ca4db47ff..06c5bc185 100644 --- a/src/pages/Perimeter.js +++ b/src/pages/Perimeter.js @@ -9,8 +9,10 @@ import React from 'react'; import mxEvent from '../mxgraph/util/mxEvent'; import mxGraph from '../mxgraph/view/mxGraph'; import mxRubberband from '../mxgraph/handler/mxRubberband'; +import mxUtils from "../mxgraph/util/mxUtils"; +import mxGraphView from "../mxgraph/view/mxGraphView"; -class MYNAMEHERE extends React.Component { +class Perimeter extends React.Component { constructor(props) { super(props); } @@ -20,106 +22,109 @@ class MYNAMEHERE extends React.Component { return ( <>