Skip to content

Commit 50480ce

Browse files
committed
drawio static implemted
1 parent 55e5498 commit 50480ce

8 files changed

+238
-39
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"gulp-notify": "^4.0.0",
4949
"gulp-typescript": "^6.0.0-alpha.1",
5050
"gulp-zip": "^5.1.0",
51+
"jest-fetch-mock": "^3.0.3",
5152
"lodash": "^4.17.21",
5253
"nanoid": "^3.3.4",
5354
"pako": "^2.0.4",

spec/drawio.test.ts

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import { DrawioOptions, GFDrawio } from '../src/drawio_base';
2+
3+
const url_drawio =
4+
'http://localhost:3000/public/plugins/agenty-flowcharting-panel//libs/drawio/js/viewer-static.min.js';
5+
6+
describe('GFDrawio tests', () => {
7+
// Test if encode/decode data from draw.io works
8+
describe('Encode/Decode', () => {
9+
let xmlGraph, compGraph;
10+
beforeAll(() => {
11+
xmlGraph =
12+
'<mxGraphModel dx="1073" dy="521" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="arrow-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jettySize=auto;orthogonalLoop=1;strokeWidth=4;shadow=1;" parent="1" source="shape-grafana" target="shape-love" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><object label="Grafana" href="www.google.fr" id="shape-grafana"><mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;shadow=1;" parent="1" vertex="1"><mxGeometry x="10" y="10" width="120" height="60" as="geometry"/></mxCell></object><mxCell id="arrow-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jettySize=auto;orthogonalLoop=1;strokeWidth=4;shadow=1;" parent="1" source="shape-love" target="shape-mxgraph" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="shape-love" value="loves" style="triangle;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;shadow=1;" parent="1" vertex="1"><mxGeometry x="210" width="60" height="80" as="geometry"/></mxCell><mxCell id="shape-mxgraph" value="mxGraph" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;shadow=1;" parent="1" vertex="1"><mxGeometry x="340" width="120" height="80" as="geometry"/></mxCell><mxCell id="text-grafana" value="MyText : TextVal" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="9" y="50" width="120" height="20" as="geometry"/></mxCell><mxCell id="text-arrow1" value="Text 2" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="150" y="20" width="40" height="20" as="geometry"/></mxCell><mxCell id="text-arrow2" value="Text 3" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="280" y="20" width="40" height="20" as="geometry"/></mxCell><mxCell id="text-mxgraph" value="Text 4" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="380" y="50" width="40" height="20" as="geometry"/></mxCell></root></mxGraphModel>';
13+
compGraph =
14+
'7ZfBcpswEIafxsdkANnYPiZO6h6akzttepTRAkoF65FlA336SiAMCnbGnnHSmUwvtvZfLYhvdyUYkUVWLiXdpE/IQIwCj5Uj8jAKAt+bEv1nlKpRJoHfCInkzE7qhBX/A22kVXecwdaZqBCF4htXjDDPIVKORqXEwp0Wo3DvuqGJvaPXCauIChhM+8mZSht1Fkw7/SvwJG3v7IfzxpPRdrK98DalDIueRB5HZCERVTPKygUIA6/l0sR9OeE9LExCrs4JqGnc2LCtqtonBKYf2JooVYoJ5lQ8duq9xF3OwFzG01aqMqGHvh5CydVzb/zLTLmdWOuhtBG1UbVGrmT13Dd6UcbswmqrjXsBpSpbH3SnUEvdar8hbuw6tkri70OuxkZpwRv3kFpLBHcyskh0xAZuEkljmlNbdFQmoPpugXtofIZg71oW/xIwA/0EeoIEQRXfuyVFbWUmh3ld8vTA5q82cf1iajvwBF2DaMKW/dWlEuJGLoriNkFMBNzGsnG2BTB4KrdOeiXRJdwgK1KuYLWhNZ1Ct7lbBDEXYoECZR1L4hjCKDokoudh0/na885OyB6kgvJNroddpomoXLPo+tVvmzDt9WroXZwIbdpcvNVjwf8eO7fHuiYaNlhWJuZM+aAeG+Ty9QL3VOzs1Y24HSRZSU7zpM7mZS0DPpvA9FjLzMMpoeE7tMyxJgmP9Mjs8h45AdLJZo+lfXMYtowQ+oy/HKZGOWPjYzBnwZqE7wGTjM/cca5BU69JuUdTD+ZT9V27tTYid/rXGD+oGFaqmeRAdGHlmMMrslaigie5NiNNC7R+byhx/bp0Zx0ZZ+xkC7ib3BXIz52Nf3JmGoJrpaHe7v1BFmwOhsfAp+HuT9wjNxiSH787+OAUePJ5wR+2kH8E/tQubsmPPy958or8kc3mSuS12X0V1r7etzV5/As=';
15+
});
16+
test('Should Decode', () => {
17+
expect(GFDrawio.decode(compGraph)).toBe(xmlGraph);
18+
});
19+
test('Should Encode', () => {
20+
expect(GFDrawio.encode(xmlGraph)).toBe(compGraph);
21+
});
22+
test('Showld Isencoded', () => {
23+
expect(GFDrawio.isEncoded(compGraph)).toBeTruthy();
24+
});
25+
test('Showld ! Isencoded', () => {
26+
expect(GFDrawio.isEncoded(xmlGraph)).toBeFalsy();
27+
});
28+
});
29+
30+
describe.skip('Fetch nodejs', () => {
31+
it('fetch correctly', async () => {
32+
const response = await fetch('https://www.google.com/')
33+
const data = await response.text();
34+
expect(data).not.toBe(null);
35+
});
36+
});
37+
38+
describe('Load Library', () => {
39+
describe('Local load', () => {
40+
let options: DrawioOptions;
41+
beforeAll(() => {});
42+
test('Load in local', async () => {
43+
options = {
44+
libLoad: false,
45+
mode: 'local',
46+
};
47+
GFDrawio.init(options);
48+
expect(GFDrawio.GFInitialized).toBeTruthy();
49+
const result = GFDrawio.loadLibs();
50+
expect(result).toBeInstanceOf(Promise);
51+
await result;
52+
expect(GFDrawio.libLoaded).toBeTruthy();
53+
expect(GFDrawio.libInitialized).toBeTruthy();
54+
console.log(global);
55+
});
56+
test.skip('Load in distant', async () => {
57+
options = {
58+
libLoad: false,
59+
libServer: 'http://localhost:3000/public/plugins/agenty-flowcharting-panel//libs/drawio/js/viewer-static.min.js',
60+
mode: 'server',
61+
};
62+
GFDrawio.init(options);
63+
expect(GFDrawio.GFInitialized).toBeTruthy();
64+
const result = GFDrawio.loadLibs();
65+
expect(result).toBeInstanceOf(Promise);
66+
await result;
67+
expect(GFDrawio.libLoaded).toBeTruthy();
68+
expect(GFDrawio.libInitialized).toBeTruthy();
69+
console.log(global);
70+
});
71+
});
72+
});
73+
});

spec/global_class.test.ts

+9-28
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import { $GF, GFDrawioTools, GFTimer, GFVariables } from '../src/globals_class';
1+
import { $GF, GFTimer, GFVariables } from '../src/globals_class';
2+
import { GFDrawio } from '../src/drawio_base';
23

34
const $scope = require('$scope');
45
const templateSrv = {};
56
const dashboard = {};
67
const ctrl = require('ctrl');
78
const $gf = $GF.create($scope, templateSrv, dashboard, ctrl);
8-
const xmlGraph =
9-
'<mxGraphModel dx="1073" dy="521" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="arrow-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jettySize=auto;orthogonalLoop=1;strokeWidth=4;shadow=1;" parent="1" source="shape-grafana" target="shape-love" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><object label="Grafana" href="www.google.fr" id="shape-grafana"><mxCell style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;shadow=1;" parent="1" vertex="1"><mxGeometry x="10" y="10" width="120" height="60" as="geometry"/></mxCell></object><mxCell id="arrow-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jettySize=auto;orthogonalLoop=1;strokeWidth=4;shadow=1;" parent="1" source="shape-love" target="shape-mxgraph" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="shape-love" value="loves" style="triangle;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;shadow=1;" parent="1" vertex="1"><mxGeometry x="210" width="60" height="80" as="geometry"/></mxCell><mxCell id="shape-mxgraph" value="mxGraph" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;shadow=1;" parent="1" vertex="1"><mxGeometry x="340" width="120" height="80" as="geometry"/></mxCell><mxCell id="text-grafana" value="MyText : TextVal" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="9" y="50" width="120" height="20" as="geometry"/></mxCell><mxCell id="text-arrow1" value="Text 2" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="150" y="20" width="40" height="20" as="geometry"/></mxCell><mxCell id="text-arrow2" value="Text 3" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="280" y="20" width="40" height="20" as="geometry"/></mxCell><mxCell id="text-mxgraph" value="Text 4" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"><mxGeometry x="380" y="50" width="40" height="20" as="geometry"/></mxCell></root></mxGraphModel>';
10-
const compGraph =
11-
'7ZfBcpswEIafxsdkANnYPiZO6h6akzttepTRAkoF65FlA336SiAMCnbGnnHSmUwvtvZfLYhvdyUYkUVWLiXdpE/IQIwCj5Uj8jAKAt+bEv1nlKpRJoHfCInkzE7qhBX/A22kVXecwdaZqBCF4htXjDDPIVKORqXEwp0Wo3DvuqGJvaPXCauIChhM+8mZSht1Fkw7/SvwJG3v7IfzxpPRdrK98DalDIueRB5HZCERVTPKygUIA6/l0sR9OeE9LExCrs4JqGnc2LCtqtonBKYf2JooVYoJ5lQ8duq9xF3OwFzG01aqMqGHvh5CydVzb/zLTLmdWOuhtBG1UbVGrmT13Dd6UcbswmqrjXsBpSpbH3SnUEvdar8hbuw6tkri70OuxkZpwRv3kFpLBHcyskh0xAZuEkljmlNbdFQmoPpugXtofIZg71oW/xIwA/0EeoIEQRXfuyVFbWUmh3ld8vTA5q82cf1iajvwBF2DaMKW/dWlEuJGLoriNkFMBNzGsnG2BTB4KrdOeiXRJdwgK1KuYLWhNZ1Ct7lbBDEXYoECZR1L4hjCKDokoudh0/na885OyB6kgvJNroddpomoXLPo+tVvmzDt9WroXZwIbdpcvNVjwf8eO7fHuiYaNlhWJuZM+aAeG+Ty9QL3VOzs1Y24HSRZSU7zpM7mZS0DPpvA9FjLzMMpoeE7tMyxJgmP9Mjs8h45AdLJZo+lfXMYtowQ+oy/HKZGOWPjYzBnwZqE7wGTjM/cca5BU69JuUdTD+ZT9V27tTYid/rXGD+oGFaqmeRAdGHlmMMrslaigie5NiNNC7R+byhx/bp0Zx0ZZ+xkC7ib3BXIz52Nf3JmGoJrpaHe7v1BFmwOhsfAp+HuT9wjNxiSH787+OAUePJ5wR+2kH8E/tQubsmPPy958or8kc3mSuS12X0V1r7etzV5/As=';
129

1310
describe('Test Global $GF utils', () => {
1411
describe('utils ID', () => {
@@ -20,31 +17,15 @@ describe('Test Global $GF utils', () => {
2017
});
2118
});
2219

23-
// Test if encode/decode data from draw.io works
24-
describe('Encode/Decode', () => {
25-
test('Should Decode', () => {
26-
expect(GFDrawioTools.decode(compGraph)).toBe(xmlGraph);
27-
});
28-
test('Should Encode', () => {
29-
expect(GFDrawioTools.encode(xmlGraph)).toBe(compGraph);
30-
});
31-
test('Showld Isencoded', () => {
32-
expect(GFDrawioTools.isEncoded(compGraph)).toBeTruthy();
33-
});
34-
test('Showld ! Isencoded', () => {
35-
expect(GFDrawioTools.isEncoded(xmlGraph)).toBeFalsy();
36-
});
37-
});
38-
3920
// Test if eval javascript works
4021
describe('Secure Eval', () => {
4122
let variables;
42-
beforeAll(()=> {
23+
beforeAll(() => {
4324
variables = GFVariables.create();
44-
})
45-
afterAll(()=> {
25+
});
26+
afterAll(() => {
4627
variables = GFVariables.create();
47-
})
28+
});
4829
it('should be enable to understand Math Lib', () => {
4930
expect(variables.eval('Math.random()')).toBeGreaterThan(0);
5031
expect(variables.eval('Math.random() * 100')).toBeLessThanOrEqual(101);
@@ -57,14 +38,14 @@ describe('Test Global $GF utils', () => {
5738
// Test if globalvariables
5839
describe('Variables', () => {
5940
let variables, key, value, text_entry, text_result;
60-
beforeEach(()=>{
41+
beforeEach(() => {
6142
key = '_value';
6243
value = 12345;
6344
text_entry = 'My text is ${_value} at this time';
6445
text_result = 'My text is 12345 at this time';
6546
variables = GFVariables.create();
6647
});
67-
beforeEach(()=>{
48+
beforeEach(() => {
6849
variables.clear();
6950
});
7051
test('Should be not null', () => {
@@ -199,7 +180,7 @@ describe('Test Global $GF utils', () => {
199180
pr.then(() => {
200181
expect(step).toBe(1);
201182
expect(myTimer.isFinished()).toBeTruthy();
202-
})
183+
});
203184
});
204185
test.skip('start with wait', async () => {
205186
myTimer.addStep(fn.bind(this), stepTime);

spec/setup-jest.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// setup-jest.js
2+
import fetchMock from 'jest-fetch-mock';
3+
fetchMock.enableMocks();
4+
25
const lodash = require('lodash');
36
global._ = lodash;
47

5-
const $ = require('jquery');
6-
global.$ = $;
8+
global.$ = require('jquery');
79

810
import angular from 'angular';
911
global.angular = angular;

src/drawio_base.ts

+94-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,104 @@
1-
import { GFLog } from "globals_class";
1+
import { GFCONSTANT, GFLog, GFPlugin } from 'globals_class';
22
import { inflateRaw, deflateRaw } from 'pako';
3+
import { readFile } from 'fs';
4+
import { GFEvents } from 'flowcharting_base';
35

6+
const _DEBUG = true;
7+
const _log = (...args: unknown[]) => {
8+
if (_DEBUG) {
9+
console.log(args);
10+
}
11+
};
12+
13+
const gfdrawioSignalsArray = ['drawio_initialized'] as const;
14+
type GFDrawioSignals = typeof gfdrawioSignalsArray[number];
15+
16+
17+
export interface DrawioOptions {
18+
mode?: 'local' | 'server';
19+
libLoad?: boolean;
20+
libLocal?: string;
21+
libServer?: string;
22+
}
423
export class GFDrawio {
24+
static GFInitialized = false;
25+
static libInitialized = false;
26+
static libLoaded = false;
27+
static libPromize: Promise<unknown> | undefined;
28+
static libContent: string;
29+
static options: DrawioOptions;
30+
static events: GFEvents<GFDrawioSignals> = GFEvents.create(gfdrawioSignalsArray)
31+
32+
static init(options?: DrawioOptions) {
33+
_log('📋', this.constructor.name, options);
34+
this.GFInitialized = true;
35+
this.options = Object.assign(this._getDefaultOptions(), options);
36+
}
37+
38+
private static _getDefaultOptions(): DrawioOptions {
39+
return {
40+
mode: 'server',
41+
libLoad: true,
42+
libLocal: `./src/${GFCONSTANT.CONF_FILE_DRAWIOLIB}`,
43+
libServer: `${GFPlugin.getRootPath()}/${GFCONSTANT.CONF_FILE_DRAWIOLIB}`,
44+
};
45+
}
46+
47+
static async loadLibs() {
48+
if (!GFDrawio.GFInitialized) {
49+
GFDrawio.init();
50+
}
51+
let result: Promise<any>;
52+
if (GFDrawio.options.mode === 'local') {
53+
result = GFDrawio._loadLocal();
54+
} else {
55+
result = GFDrawio._loadServer();
56+
}
57+
return result.then((code) => {
58+
GFDrawio.libLoaded = true;
59+
if (typeof code === 'string') {
60+
return GFDrawio._evalLib(code);
61+
}
62+
return;
63+
});
64+
}
65+
66+
private static async _loadLocal() {
67+
let source: string = this.options.libLocal ? this.options.libLocal : '';
68+
return new Promise<string>((resolve, reject) => {
69+
readFile(source, (error, data) => {
70+
resolve(data.toString());
71+
});
72+
});
73+
}
74+
75+
private static async _evalLib(code: string) {
76+
globalThis.eval(code);
77+
// const evalfunc = new Function(code);
78+
// evalfunc();
79+
GFDrawio.libInitialized = true;
80+
console.log(globalThis);
81+
}
82+
83+
private static async _loadServer() {
84+
if (!this.libInitialized && this.options.libServer) {
85+
const url = this.options.libServer;
86+
return fetch(url).then( (res: Response) => {
87+
debugger
88+
return res.text();
89+
}).catch((error)=>{
90+
debugger
91+
_log(error)
92+
})
93+
}
94+
return;
95+
}
96+
597
static parseXml(xmlString: string): Document {
698
var parser = new DOMParser();
799
return parser.parseFromString(xmlString, 'text/xml');
8100
}
101+
9102
/**
10103
* drawio context source
11104
* @param {Object} node

src/globals_class.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,31 @@ export class GFCONSTANT {
2323
// CONFIG
2424
static readonly CONF_PATH_LIBS = 'libs/';
2525
static readonly CONF_PATH_DRAWIO = 'libs/drawio/';
26+
static readonly CONF_PATH_DRAWIOJS = 'libs/drawio/js';
2627
static readonly CONF_PATH_STATIC = 'static/';
2728
static readonly CONF_PATH_PARTIALS = 'partials/';
2829
static readonly CONF_PATH_STYLES = 'styles/';
2930
static readonly CONF_FILE_PLUGINJSON = './plugin.json';
3031
static readonly CONF_FILE_DEFAULTDIO = 'static/defaultGraph.drawio';
3132
static readonly CONF_FILE_DEFAULTCSV = 'static/defaultGraph.csv';
3233
static readonly CONF_FILE_SHAPESTXT = 'static/shapes.txt';
33-
// static readonly CONF_FILE_APPJS = 'libs/drawio/js/app.min.js';
34-
// static readonly CONF_FILE_INTEGRATEJS = 'libs/drawio/js/app.min.js';
35-
// static readonly CONF_FILE_SHAPESJS = 'libs/drawio/js/shapes.min.js';
36-
// static readonly CONF_FILE_VIEWERJS = 'libs/drawio/js/viewer.min.js';
37-
static readonly CONF_FILE_VIEWERJS = 'libs/drawio/js/viewer-static.min.js';
34+
static readonly CONF_NAME_APPJS = 'app.min.js';
35+
static readonly CONF_NAME_INTEGRATEJS = 'app.min.js';
36+
static readonly CONF_NAME_SHAPESJS = 'shapes.min.js';
37+
static readonly CONF_NAME_VIEWERJS = 'viewer.min.js';
38+
static readonly CONF_NAME_STATIC_VIEWERJS = 'viewer-static.min.js';
39+
// Used lib : CONF_NAME_APPJS | CONF_NAME_INTEGRATEJS | CONF_NAME_SHAPESJS
40+
static readonly CONF_DEFAULT_DRAWIOJS = this.CONF_NAME_STATIC_VIEWERJS;
41+
static readonly CONF_FILE_DRAWIOLIB = `${this.CONF_PATH_DRAWIOJS}/${this.CONF_DEFAULT_DRAWIOJS}`;
3842
static readonly CONF_FILE_PRECONFIGJS = 'libs/drawio/js/PreConfig.js';
3943
static readonly CONF_FILE_POSTCONFIGJS = 'libs/drawio/js/PostConfig.js';
4044
static readonly CONF_FILE_VERSION = 'VERSION';
4145
static readonly CONF_TOOLTIPS_DELAY = 200;
4246
static readonly CONF_GRAPHHOVER_DELAY = 50;
43-
static readonly CONF_COLORS_STEPS = 10;
47+
static readonly CONF_COLORS_STEPS = 5;
4448
static readonly CONF_COLORS_MS = 50;
4549
static readonly CONF_ANIMS_STEP = 10;
46-
static readonly CONF_ANIMS_MS = 50;
50+
static readonly CONF_ANIMS_MS = 100;
4751
static readonly CONF_GFMESSAGE_MS = 5000;
4852
static readonly CONF_BLINK_COLOR = '#f5f242';
4953
static readonly CONF_HIGHTLIGHT_COLOR = '#99ff33';

src/graph_class.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class XGraph {
161161
// $GF.utils.$evalFile(`${GFPlugin.getDrawioPath()}js/shapes.min.js`);
162162

163163
// Eval Fileor Eval Code
164-
$GF.utils.$evalFile(`${GFPlugin.getRootPath()}${GFCONSTANT.CONF_FILE_VIEWERJS}`);
164+
$GF.utils.$evalFile(`${GFPlugin.getRootPath()}${GFCONSTANT.CONF_FILE_DRAWIOLIB}`);
165165
// mxcustom.evalCode();
166166
mxcustom.customize();
167167
XGraph.postInitGlobalVars();

0 commit comments

Comments
 (0)