-
Notifications
You must be signed in to change notification settings - Fork 6
/
mxgraph.js
25 lines (22 loc) · 854 Bytes
/
mxgraph.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let mxgraphFactory = require('mxgraph')
// comment by eko.zhan at 2019-07-24 16:00
// fixme mxBasePath 等参数无效,目前是在 public/index.html 中定义
const factory = new mxgraphFactory({
mxImageBasePath: './static/images',
mxBasePath: './static'
})
// let _default = {}
// for (var name in factory) {
// _default[name] = factory[name]
// }
// Editor doesn't created when mxGraph is used as npm module
// see https://github.com/jgraph/mxgraph/issues/49
window.mxGraph = factory.mxGraph
window.mxGraphModel = factory.mxGraphModel
window.mxEditor = factory.mxEditor
window.mxGeometry = factory.mxGeometry
window.mxDefaultKeyHandler = factory.mxDefaultKeyHandler
window.mxDefaultPopupMenu = factory.mxDefaultPopupMenu
window.mxStylesheet = factory.mxStylesheet
window.mxDefaultToolbar = factory.mxDefaultToolbar
module.exports = factory