mxdraw 0.1.5 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +18 -1
  2. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +25 -12
  3. package/dist/lib/MxModule/MxDbImage/MxDbImage.js +18 -6
  4. package/dist/lib/MxModule/MxDbRect/MxDbRect.js +140 -86
  5. package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +49 -32
  6. package/dist/lib/MxModule/MxDbSVGText/MxDbSVGText.js +18 -0
  7. package/dist/lib/MxModule/MxDbSVGText/index.js +5 -0
  8. package/dist/lib/MxModule/MxFun/MxFun.js +20 -2
  9. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +2 -0
  10. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +61 -45
  11. package/dist/lib/MxModule/store/store.js +1 -3
  12. package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +16 -9
  13. package/dist/lib/mxdraw.js +4 -1
  14. package/dist/lib/tools/dynamicImport/index.js +5 -5
  15. package/dist/lib/tools/three/index.js +21 -15
  16. package/dist/lib/types/MxCADObject.js +0 -1
  17. package/dist/mxdraw.es5.js +3 -3
  18. package/dist/mxdraw.es5.js.map +1 -1
  19. package/dist/mxdraw.umd.js +3 -3
  20. package/dist/mxdraw.umd.js.map +1 -1
  21. package/dist/types/MxModule/McGiWorldDraw/index.d.ts +1 -1
  22. package/dist/types/MxModule/McGiWorldDrawType/index.d.ts +1 -1
  23. package/dist/types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts +1 -1
  24. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +12 -4
  25. package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +21 -42
  26. package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +5 -9
  27. package/dist/types/MxModule/MxDbSVGText/MxDbSVGText.d.ts +7 -0
  28. package/dist/types/MxModule/MxDbSVGText/index.d.ts +3 -0
  29. package/dist/types/MxModule/MxFun/MxFun.d.ts +14 -1
  30. package/dist/types/MxModule/store/store.d.ts +0 -1
  31. package/dist/types/mxdraw.d.ts +3 -1
  32. package/dist/types/types/MxCADObject.d.ts +5 -5
  33. package/package.json +1 -1
@@ -51,7 +51,7 @@ var MxFun = /** @class */ (function () {
51
51
  * ```
52
52
  */
53
53
  MxFun.prototype.createMxObject = function (_a) {
54
- var _b = _a.canvasId, canvasId = _b === void 0 ? (0, random_1.createReandomId)() : _b, _c = _a.cadFile, cadFile = _c === void 0 ? '' : _c, callback = _a.callback, _d = _a.isNewFile, isNewFile = _d === void 0 ? false : _d, _e = _a.useWebsocket, useWebsocket = _e === void 0 ? false : _e;
54
+ var _b = _a.canvasId, canvasId = _b === void 0 ? (0, random_1.createReandomId)() : _b, _c = _a.cadFile, cadFile = _c === void 0 ? '' : _c, callback = _a.callback, _d = _a.isNewFile, isNewFile = _d === void 0 ? false : _d, _e = _a.useWebsocket, useWebsocket = _e === void 0 ? false : _e, _f = _a.isAutoResize, isAutoResize = _f === void 0 ? true : _f;
55
55
  // 获取canvas和其父级
56
56
  var canvas = (0, create_1.createCanvas)(canvasId);
57
57
  var canvasParent = (0, create_1.createCanvasParent)(canvas);
@@ -59,6 +59,10 @@ var MxFun = /** @class */ (function () {
59
59
  // canvasParent 未插入到文档
60
60
  document.body.appendChild(canvasParent);
61
61
  }
62
+ if (!useWebsocket && isNewFile) {
63
+ // 只有sockec方式,才能新建文件,这里暂是把isNewFile设置成 false
64
+ isNewFile = false;
65
+ }
62
66
  // 设置样式
63
67
  // canvasParent.style.width = '100%'
64
68
  // canvasParent.style.height = '80vh'
@@ -77,7 +81,8 @@ var MxFun = /** @class */ (function () {
77
81
  };
78
82
  });
79
83
  // 使用canvas侦听器 监听canvas元素的大小变化
80
- (0, useCanvasResizeListener_1.default)(mxdrawObj, canvas);
84
+ if (isAutoResize)
85
+ (0, useCanvasResizeListener_1.default)(mxdrawObj, canvas);
81
86
  callback &&
82
87
  callback(mxdrawObj, {
83
88
  canvas: canvas,
@@ -558,6 +563,19 @@ var MxFun = /** @class */ (function () {
558
563
  MxFun.prototype.openFile = function (sFile) {
559
564
  return store_1.default.state.MxFun.openFile(sFile);
560
565
  };
566
+ /**
567
+ * 添加一个MxDbEntity实体到当前绘图对象上。
568
+ * @param ent 实体对象
569
+ * @returns number 返回对象的id.
570
+ * @example
571
+ * ```typescript
572
+ *
573
+ *
574
+ * ```
575
+ */
576
+ MxFun.prototype.addToCurrentSpace = function (ent) {
577
+ return this.getCurrentDraw().addMxEntity(ent);
578
+ };
561
579
  return MxFun;
562
580
  }());
563
581
  exports.default = MxFun;
@@ -45,11 +45,13 @@ var MxDbImage_1 = require("../MxDbImage");
45
45
  var MxDbSVG_1 = require("../MxDbSVG");
46
46
  var MxDbAlignedDimension_1 = require("../MxDbAlignedDimension");
47
47
  var MxDbLine_1 = require("../MxDbLine");
48
+ var MxDbRect_1 = require("../MxDbRect");
48
49
  function rxInitMxEntity() {
49
50
  new MxDbImage_1.default().rxInit();
50
51
  new MxDbSVG_1.default().rxInit();
51
52
  new MxDbAlignedDimension_1.default().rxInit();
52
53
  new MxDbLine_1.default().rxInit();
54
+ new MxDbRect_1.default().rxInit();
53
55
  }
54
56
  /**
55
57
  * 加载MxDraw库的核心代码 才能使用Mx的其他模块
@@ -5299,7 +5299,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5299
5299
  } }, S.prototype.seInValidPoint = function () { this.setPoint(void 0); }, S.prototype.getCurrentOSnapPoint = function (t) { var e = {}; return this.isEnable() ? (e.pt = t, e.osmode = this.m_osmode, this.m_osmode != v.MxJigCmdManager.OsnapMode.kOsModekValid ? (e.pt.x = this.m_ptSnapPoint.x, e.pt.y = this.m_ptSnapPoint.y, e.pt.z = this.m_ptSnapPoint.z, s.isOsnapZValue() || (t.z = 0)) : e.pt = t) : (e.pt = t, e.osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid), e; }, S.prototype.setLongprogressStatus = function (t) { this.m_iLongprogressStatus = t; }, S.prototype.reComputeOffset = function () { }, S);
5300
5300
  function S(t) { this.m_inPoint = new f.Vector3, this.m_vecOffset = new f.Vector3, this.m_pt = new f.Vector3, this.m_isValid = !1, this.m_ptSnapPoint = new f.Vector3, this.m_ptSnapSrcPoint = new f.Vector3, this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid, this.m_prvInputPoint = new f.Vector3, this.m_isValidPrvInputPoint = !1, this.m_lOSmode = 0, this.m_iLongprogressStatus = -1, this.m_isOffsetInputPostion = !1, this.m_mxJig = null, this.m_notifyOsnap_delayCall = void 0, this.m_isRuning = !1, this.m_isEnable = !1, this.m_mxJig = t, this.m_draw = new b; }
5301
5301
  n.McEdJigOsnap = M;
5302
- }, { "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59, "./MxWindowsEvent": 65, three: 19 }], 21: [function (t, e, n) {
5302
+ }, { "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59, "./MxWindowsEvent": 66, three: 19 }], 21: [function (t, e, n) {
5303
5303
  "use strict";
5304
5304
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5305
5305
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -5318,7 +5318,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5318
5318
  this.drawEntity(i), this.drawEntity(u.MxThreeJS.createLines(t.slice(0), this.iColor, 0));
5319
5319
  }
5320
5320
  else
5321
- this.drawEntity(u.MxThreeJS.createLines(t.slice(0), this.iColor)); }, d.prototype.drawSelectLine = function (t, e, n, i) { t instanceof Object && e instanceof Object ? this.drawEntity(u.MxThreeJS.createLine(t, e, this.iColor, 0)) : "number" == typeof t && "number" == typeof e && this.drawEntity(u.MxThreeJS.createLine(new c.Vector3(t, e, 0), new c.Vector3(n, i, 0), this.iColor, 0)); }, d.prototype.drawLine = function (t, e, n, i) { var r, a; if (t instanceof Object && e instanceof Object ? (r = t, a = e) : "number" == typeof t && "number" == typeof e && (r = new c.Vector3(t, e, 0), a = new c.Vector3(n, i, 0)), 0 != this.dLineWidth) {
5321
+ this.drawEntity(u.MxThreeJS.createLines(t.slice(0), this.iColor, this.opacity)); }, d.prototype.drawSelectLine = function (t, e, n, i) { t instanceof Object && e instanceof Object ? this.drawEntity(u.MxThreeJS.createLine(t, e, this.iColor, 0)) : "number" == typeof t && "number" == typeof e && this.drawEntity(u.MxThreeJS.createLine(new c.Vector3(t, e, 0), new c.Vector3(n, i, 0), this.iColor, 0)); }, d.prototype.drawLine = function (t, e, n, i) { var r, a; if (t instanceof Object && e instanceof Object ? (r = t, a = e) : "number" == typeof t && "number" == typeof e && (r = new c.Vector3(t, e, 0), a = new c.Vector3(n, i, 0)), 0 != this.dLineWidth) {
5322
5322
  this.createWidthMaterial();
5323
5323
  var o = new Float32Array(6);
5324
5324
  o[0] = r.x, o[1] = r.y, o[2] = 0, o[3] = a.x, o[4] = a.y, o[5] = 0;
@@ -5328,10 +5328,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5328
5328
  l.renderOrder = this.iRenderOrder, this.drawEntity(l), this.drawSelectLine(r, a);
5329
5329
  }
5330
5330
  else
5331
- this.drawEntity(u.MxThreeJS.createLine(r, a, this.iColor)); }, d.prototype.drawCircle = function (t, e) { this.drawEntity(u.MxThreeJS.createCircle(t, e, this.iColor)); }, d.prototype.drawText = function (t, e, n, i) { var r = u.MxThreeJS.creatTextSprite(t, i, e, n, this.iColor); this.drawEntity(r); }, d.prototype.setupForEntity = function (t) { this.iColor = t.getColor(), this.iRenderOrder = t.getRenderOrder(); }, d);
5332
- function d(t, e) { this.aryEntity = [], this.iColor = 16777215, this.dLineWidth = 0, this.lineWidthIsPixels = !0, this.iRenderOrder = s.MxData.iMxEntityRenderOrder, this.worldDrawType = 1, this.widthMaterial = null, this.dDashArray = 0, this.dDashRatio = 0, this.mxObj = t, this.worldDrawType = e; }
5331
+ this.drawEntity(u.MxThreeJS.createLine(r, a, this.iColor, this.opacity)); }, d.prototype.drawCircle = function (t, e) { this.drawEntity(u.MxThreeJS.createCircle(t, e, this.iColor)); }, d.prototype.drawText = function (t, e, n, i) { var r = u.MxThreeJS.creatTextSprite(t, i, e, n, this.iColor); this.drawEntity(r); }, d.prototype.setupForEntity = function (t) { this.iColor = t.getColor(), this.iRenderOrder = t.getRenderOrder(), this.opacity = t.opacity; }, d);
5332
+ function d(t, e) { this.aryEntity = [], this.iColor = 16777215, this.dLineWidth = 0, this.lineWidthIsPixels = !0, this.iRenderOrder = s.MxData.iMxEntityRenderOrder, this.worldDrawType = 1, this.widthMaterial = null, this.dDashArray = 0, this.dDashRatio = 0, this.opacity = 1, this.mxObj = t, this.worldDrawType = e; }
5333
5333
  n.McGiWorldDraw = l;
5334
- var p, f = (r(m, p = l), m.prototype.setCurEntityId = function (t) { this.curEntityId = t; }, m.prototype.drawEntity = function (t) { }, m.prototype.drawText = function (t, e, n, i) { }, m.prototype.drawSelectLine = function (t, e, n, i) { }, m.prototype.isValid = function () { return 0 != this.curEntityId || (console.log("this.curEntityId == 0"), !1); }, m.prototype.drawLine = function (t, e, n, i) { var r, a; this.isValid() && (t instanceof Object && e instanceof Object ? (r = t, a = e) : "number" == typeof t && "number" == typeof e && (r = new c.Vector3(t, e, 0), a = new c.Vector3(n, i, 0)), this.selectManager.addLineDisplay(this.curEntityId, r, a)); }, m.prototype.drawCircle = function (t, e) { this.isValid() && this.selectManager.addCircleDisplay(this.curEntityId, t, e); }, m);
5334
+ var p, f = (r(m, p = l), m.prototype.setCurEntityId = function (t) { this.curEntityId = t; }, m.prototype.drawEntity = function (t) { }, m.prototype.drawText = function (t, e, n, i) { }, m.prototype.drawSelectLine = function (t, e, n, i) { }, m.prototype.isValid = function () { return 0 != this.curEntityId || (console.log("this.curEntityId == 0"), !1); }, m.prototype.drawLine = function (t, e, n, i) { var r, a; this.isValid() && (t instanceof Object && e instanceof Object ? (r = t, a = e) : "number" == typeof t && "number" == typeof e && (r = new c.Vector3(t, e, 0), a = new c.Vector3(n, i, 0)), this.selectManager.addLineDisplay(this.curEntityId, r, a)); }, m.prototype.drawCircle = function (t, e) { this.isValid() && this.selectManager.addCircleDisplay(this.curEntityId, t, e); }, m.prototype.drawLines = function (t) { if (!(t.length < 2))
5335
+ for (var e = t.length, n = 0; n < e - 1; n++)
5336
+ this.selectManager.addLineDisplay(this.curEntityId, t[n], t[n + 1]); }, m);
5335
5337
  function m(t, e) { var n = p.call(this, t, a.kSelectDraw) || this; return n.selectManager = e, n.curEntityId = 0, n; }
5336
5338
  n.McGiWorldDrawSelect = f;
5337
5339
  }, { "./MxManager": 51, "./MxThreeJS": 58, three: 19, "three.meshline": 18 }], 22: [function (t, e, n) {
@@ -5987,21 +5989,31 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5987
5989
  }, { "./MxDbEntity": 35, "./MxDbEntityGrip": 36, "./MxDbEntitySelect": 37, "./MxFun": 45, "./MxManager": 51, "./MxType": 60, three: 19 }], 35: [function (t, e, n) {
5988
5990
  "use strict";
5989
5991
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbEntity = n.MxDbEntityClassHierarchy = n.MxDbEntityUserObject = void 0;
5990
- var s = t("three"), l = t("./McGiWorldDraw"), i = t("./MxManager"), r = t("./MxType"), a = (o.prototype.getTypeName = function () { return ""; }, o.prototype.getImp = function () { return this.MxDbEntityImp; }, o.prototype.upDisplay = function () { var t = this.getImp(); return !!t && t.upDisplay(); }, o.prototype.erase = function () { var t = this.getImp(); return !!t && t.erase(); }, o.prototype.setColor = function (t) { this.iColor = t; }, o.prototype.getColor = function () { return this.iColor; }, o.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, o.prototype.getRenderOrder = function () { return this.iRenderOrder; }, o.prototype.dwgIn = function (t) { return this.iColor = t.iColor, this.iRenderOrder = t.iRenderOrder, !0; }, o.prototype.dwgOut = function (t) { return t.iColor = this.iColor, t.iRenderOrder = this.iRenderOrder, t; }, o.prototype.clone = function (t) { var e = this.create(), n = { type: t || r.MxType.MxCloneType.kClone }; return this.dwgOut(n), e.dwgIn(n), e; }, o.prototype.init = function () { i.MxManager.getMxDbEntityClassHierarchy().init(this); }, o.prototype.transformBy = function (t) { }, o.prototype.objectId = function () { var t = this.getImp(); return t ? t.objectId() : 0; }, o);
5991
- function o() { this.iColor = 16777215, this.iRenderOrder = i.MxData.iMxEntityRenderOrder; }
5992
+ var s = t("three"), l = t("./McGiWorldDraw"), i = t("./MxManager"), c = t("./MxTools"), r = t("./MxType"), a = (o.prototype.getTypeName = function () { return ""; }, o.prototype.getImp = function () { return this.MxDbEntityImp; }, o.prototype.upDisplay = function () { var t = this.getImp(); return !!t && t.upDisplay(); }, o.prototype.erase = function () { var t = this.getImp(); return !!t && t.erase(); }, o.prototype.setColor = function (t) { this.iColor = t; }, o.prototype.getColor = function () { return this.iColor; }, o.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, o.prototype.getRenderOrder = function () { return this.iRenderOrder; }, o.prototype.dwgIn = function (t) { return this.iColor = t.iColor, this.iRenderOrder = t.iRenderOrder, this.opacity = t.opacity, this.visible = t.visible, !0; }, o.prototype.dwgOut = function (t) { return t.iColor = this.iColor, t.iRenderOrder = this.iRenderOrder, t.opacity = this.opacity, t.visible = this.visible, t; }, o.prototype.clone = function (t) { var e = this.create(), n = { type: t || r.MxType.MxCloneType.kClone }; return this.dwgOut(n), e.dwgIn(n), e; }, o.prototype.init = function () { i.MxManager.getMxDbEntityClassHierarchy().init(this); }, o.prototype.transformBy = function (t) { }, o.prototype.objectId = function () { var t = this.getImp(); return t ? t.objectId() : 0; }, o);
5993
+ function o() { this.iColor = 16777215, this.iRenderOrder = i.MxData.iMxEntityRenderOrder, this.opacity = 1, this.visible = !0; }
5992
5994
  n.MxDbEntityUserObject = a;
5993
- var c = (u.prototype.init = function (t) { var e = t.getTypeName(); this.mapType2Create.get(e) && console.log("MxError:already has this class name " + e), this.mapType2Create.set(e, t); }, u.prototype.createMxEntity = function (t) { var e = this.mapType2Create.get(t); return e ? e.create() : null; }, u);
5994
- function u() { this.mapType2Create = new Map; }
5995
- n.MxDbEntityClassHierarchy = c;
5996
- var h = (d.prototype.setObjectId = function (t) { this.id = t; }, d.prototype.setDirtyDisplay = function (t) { this.isDirtyDisplay = t; }, d.prototype.getDirtyDisplay = function () { return this.isDirtyDisplay; }, d.prototype.setMxDatabase = function (t) { this.mxDatabase = t; }, d.prototype.objectId = function () { return this.id; }, d.prototype.initUserObject = function (t) { (this.userObject = t).MxDbEntityImp = this; }, d.prototype.upDisplay = function () { if (!this.mxDatabase)
5997
- return !1; this.updateDisplayImp(this.mxDatabase.getThreeJSParentObject(), this.mxDatabase.getMxObject()); }, d.prototype.erase = function () { if (0 == this.id)
5998
- return !1; this.clearDisplayImp(this.mxDatabase.getThreeJSParentObject()), this.userObject = null, this.mxDatabase.eraseEntity(this.id), this.id = 0, this.mxDatabase = null; }, d.prototype.clearDisplayImp = function (t) { this.threeObjectGroup && (this.threeObjectGroup.traverse(function (t) { "Mesh" === t.type && (t.geometry.dispose(), t.material.dispose()); }), t.remove(this.threeObjectGroup)), this.threeObjectGroup = null; }, d.prototype.updateDisplayImp = function (t, e) { this.clearDisplayImp(t), this.threeObjectGroup = new s.Group; var n = new l.McGiWorldDraw(e, l.McGiWorldDrawType.kWorldDraw); n.setupForEntity(this.userObject), this.worldDraw(n); for (var i = n.getEntitys(), r = i.length, a = 0; a < r; a++) {
5999
- var o = i[a];
6000
- (o.MxDbEntity = this).threeObjectGroup.add(o);
6001
- } t.add(this.threeObjectGroup); }, d.prototype.worldDraw = function (t) { this.userObject.worldDraw(t); }, d.prototype.getGripPoints = function () { return this.userObject.getGripPoints(); }, d.prototype.getUserObject = function () { return this.userObject; }, d.prototype.clone = function (t) { var e = new d; return e.initUserObject(this.userObject.clone(t)), e; }, d.prototype.transformBy = function (t) { this.userObject.transformBy(t); }, d.prototype.setColor = function (t) { this.userObject.setColor(t); }, d.prototype.getColor = function () { return this.userObject.getColor(); }, d);
6002
- function d() { this.threeObjectGroup = null, this.userObject = null, this.mxDatabase = null, this.isDirtyDisplay = !1, this.id = 0; }
6003
- n.MxDbEntity = h;
6004
- }, { "./McGiWorldDraw": 21, "./MxManager": 51, "./MxType": 60, three: 19 }], 36: [function (t, e, n) {
5995
+ var u = (h.prototype.init = function (t) { var e = t.getTypeName(); this.mapType2Create.get(e) && console.log("MxError:already has this class name " + e), this.mapType2Create.set(e, t); }, h.prototype.createMxEntity = function (t) { var e = this.mapType2Create.get(t); return e ? e.create() : null; }, h);
5996
+ function h() { this.mapType2Create = new Map; }
5997
+ n.MxDbEntityClassHierarchy = u;
5998
+ var d = (p.prototype.setObjectId = function (t) { this.id = t; }, p.prototype.setDirtyDisplay = function (t) { this.isDirtyDisplay = t; }, p.prototype.getDirtyDisplay = function () { return this.isDirtyDisplay; }, p.prototype.setMxDatabase = function (t) { this.mxDatabase = t; }, p.prototype.objectId = function () { return this.id; }, p.prototype.initUserObject = function (t) { (this.userObject = t).MxDbEntityImp = this; }, p.prototype.upDisplay = function () { if (!this.mxDatabase)
5999
+ return !1; this.updateDisplayImp(this.mxDatabase.getThreeJSParentObject(), this.mxDatabase.getMxObject()); }, p.prototype.erase = function () { if (0 == this.id)
6000
+ return !1; this.clearDisplayImp(this.mxDatabase.getThreeJSParentObject()), this.userObject = null, this.mxDatabase.eraseEntity(this.id), this.id = 0, this.mxDatabase = null; }, p.prototype.clearDisplayImp = function (t) { this.threeObjectGroup && (this.threeObjectGroup.traverse(function (t) { "Mesh" === t.type && (t.geometry.dispose(), t.material.dispose()); }), t.remove(this.threeObjectGroup)), this.threeObjectGroup = null; }, p.prototype.updateDisplayImp = function (t, e) { if (this.clearDisplayImp(t), this.userObject) {
6001
+ if (this.userObject.visible) {
6002
+ this.threeObjectGroup = new s.Group;
6003
+ var n = new l.McGiWorldDraw(e, l.McGiWorldDrawType.kWorldDraw);
6004
+ n.setupForEntity(this.userObject), this.worldDraw(n);
6005
+ for (var i = n.getEntitys(), r = i.length, a = 0; a < r; a++) {
6006
+ var o = i[a];
6007
+ (o.MxDbEntity = this).threeObjectGroup.add(o);
6008
+ }
6009
+ t.add(this.threeObjectGroup);
6010
+ }
6011
+ }
6012
+ else
6013
+ c.MxTools.MxASSERT(!1, "this.userObject == null"); }, p.prototype.worldDraw = function (t) { this.userObject.worldDraw(t); }, p.prototype.getGripPoints = function () { return this.userObject.getGripPoints(); }, p.prototype.getUserObject = function () { return this.userObject; }, p.prototype.clone = function (t) { var e = new p; return e.initUserObject(this.userObject.clone(t)), e; }, p.prototype.transformBy = function (t) { this.userObject.transformBy(t); }, p.prototype.setColor = function (t) { this.userObject.setColor(t); }, p.prototype.getColor = function () { return this.userObject.getColor(); }, p);
6014
+ function p() { this.threeObjectGroup = null, this.userObject = null, this.mxDatabase = null, this.isDirtyDisplay = !1, this.id = 0; }
6015
+ n.MxDbEntity = d;
6016
+ }, { "./McGiWorldDraw": 21, "./MxManager": 51, "./MxTools": 59, "./MxType": 60, three: 19 }], 36: [function (t, e, n) {
6005
6017
  "use strict";
6006
6018
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6007
6019
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6121,7 +6133,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6121
6133
  } }
6122
6134
  function d(t) { null != t && null != t.grips && null != t.ents && a.MxFun.getCurrentMx().getMxDatabase().getGripManager().gripEditImp(t); }
6123
6135
  (n.MxDrawCommands || (n.MxDrawCommands = {})).registerCommand = function () { a.MxFun.addCommand("Mx_IntelliSel", r, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_GripEdit", u, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_FrontEndWebpageIntelliSel", h, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_FrontEndWebpageGripEdit", d, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT); };
6124
- }, { "./MxDrawData": 40, "./MxFun": 45, "./MxIntelliSelect": 46, "./MxJigCmdManager": 48, "./MxType": 60, "./MxWindowsEvent": 65 }], 40: [function (t, e, n) {
6136
+ }, { "./MxDrawData": 40, "./MxFun": 45, "./MxIntelliSelect": 46, "./MxJigCmdManager": 48, "./MxType": 60, "./MxWindowsEvent": 66 }], 40: [function (t, e, n) {
6125
6137
  "use strict";
6126
6138
  var i, r, a;
6127
6139
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawData = n.IntelliSelectType = void 0, (r = i = n.IntelliSelectType || (n.IntelliSelectType = {}))[r.kFrontEndWebpageModel = 1] = "kFrontEndWebpageModel", r[r.kBackgroundServicesModel = 2] = "kBackgroundServicesModel", (a = n.MxDrawData || (n.MxDrawData = {})).m_isEnableIntelliSelect = !1, a.m_intelliSelectType = i.kBackgroundServicesModel, a.m_isMultipleSelect = !0, a.getCursorWidthPixels = function () { return 14; }, a.setIniset = function (t) { void 0 !== t.EnableIntelliSelect && "boolean" == typeof t.EnableIntelliSelect && (a.m_isEnableIntelliSelect = t.EnableIntelliSelect), void 0 !== t.IntelliSelectType && "number" == typeof t.IntelliSelectType && (a.m_intelliSelectType = t.IntelliSelectType), void 0 !== t.multipleSelect && "boolean" == typeof t.multipleSelect && (a.m_isMultipleSelect = t.multipleSelect); };
@@ -6130,7 +6142,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6130
6142
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawObject = n.IniSetName = n.MxRunMode = void 0;
6131
6143
  var s, i, r, c = t("three"), u = t("./MxFun"), a = t("./MxCadSketchLayer"), o = t("./MxBrowseLayerData"), l = t("./MxBrowseDisplay"), O = t("./MxNetData"), h = t("./MxNetData"), d = t("./MxSelect"), p = t("./MxManager"), f = t("./MxJigCmdManager"), m = t("./MxSystemVariable"), g = t("./MxCADObject"), v = t("./MxLocalFileLoad"), y = t("./MxDrawObjectOsnap"), x = t("./MxDbDatabase"), w = t("./MxDbEntity");
6132
6144
  (i = s = n.MxRunMode || (n.MxRunMode = {}))[i.kBrowse = 1] = "kBrowse", i[i.kMxCAD = 2] = "kMxCAD", i[i.kMxCADBrowseApp = 3] = "kMxCADBrowseApp", (r = n.IniSetName || (n.IniSetName = {})).kEnableOsnapFunction = "EnableOsnapFunction";
6133
- var b = (_.prototype.getMxDatabase = function () { return this.m_mxDatabase; }, _.prototype.addMxEntity = function (t) { var e = new w.MxDbEntity; return e.initUserObject(t), this.m_mxDatabase.addEntity(e); }, _.prototype.getMxEntity = function (t) { return this.m_mxDatabase.getEntity(t); }, _.prototype.getMxEntityUserObject = function (t) { var e = this.getMxEntity(t); return e ? e.getUserObject() : null; }, _.prototype.eraseAllMxEntity = function () { this.m_mxDatabase.eraseAllEntity(); }, _.prototype.eraseMxEntity = function (t) { var e = this.m_mxDatabase.getEntity(t); return !!e && e.erase(); }, _.prototype.getAllMxEntity = function () { var e = []; return this.m_mxDatabase.getAllEntity().forEach(function (t) { t && e.push(t.getUserObject()); }), e; }, _.prototype.findMxEntityAtPoint = function (t, e) { !e && void 0 !== e || (t = this.docCoord2Screen(t.x, t.y, 0)); var n = [], i = this.m_mxDatabase.getIntersectObjects(t); if (0 == i.length)
6145
+ var b = (_.prototype.getMxDatabase = function () { return this.m_mxDatabase; }, _.prototype.addMxEntity = function (t) { if (t.getImp())
6146
+ return t.objectId(); var e = new w.MxDbEntity; return e.initUserObject(t), this.m_mxDatabase.addEntity(e); }, _.prototype.getMxEntity = function (t) { return this.m_mxDatabase.getEntity(t); }, _.prototype.getMxEntityUserObject = function (t) { var e = this.getMxEntity(t); return e ? e.getUserObject() : null; }, _.prototype.eraseAllMxEntity = function () { this.m_mxDatabase.eraseAllEntity(); }, _.prototype.eraseMxEntity = function (t) { var e = this.m_mxDatabase.getEntity(t); return !!e && e.erase(); }, _.prototype.getAllMxEntity = function () { var e = []; return this.m_mxDatabase.getAllEntity().forEach(function (t) { t && e.push(t.getUserObject()); }), e; }, _.prototype.findMxEntityAtPoint = function (t, e) { !e && void 0 !== e || (t = this.docCoord2Screen(t.x, t.y, 0)); var n = [], i = this.m_mxDatabase.getIntersectObjects(t); if (0 == i.length)
6134
6147
  return n; var r = new Map; return i.forEach(function (t) { var e = t.object.MxDbEntity; if (e) {
6135
6148
  var n = e.objectId();
6136
6149
  r.has(n) || r.set(n, e.getUserObject());
@@ -6489,32 +6502,32 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6489
6502
  }, { "./MxDrawData": 40, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 45: [function (t, e, n) {
6490
6503
  "use strict";
6491
6504
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxFun = void 0;
6492
- var p, i, r, a, o, s, l, c, u, h, f, d, m, g, v = t("three"), y = t("./MxManager"), x = t("./MxDrawObject2d"), w = t("./MxDrawObject3d"), b = t("./MxUiObjectMobile"), _ = t("./MxUiObjectPC"), M = t("./MxJigCmdManager"), S = t("./MxJigGetLine"), C = t("./MxCmdRunManager"), T = t("./MxUiVue"), E = t("./MxThreeJS"), A = t("./MxWindowsEvent"), D = t("./MxTools"), O = t("./MxDrawCommands"), L = t("./MxDrawData"), I = t("./MxCADEditDisplay"), P = t("./MxLocalFileLoad"), R = t("./TempTest/MxTestJig");
6493
- function k(t) { t.cmd && z(t.cmd); }
6494
- function N(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
6495
- function B() { return y.MxManager.currentMx(); }
6505
+ var p, i, r, a, o, s, l, c, u, h, f, d, m, g, v = t("three"), y = t("./MxManager"), x = t("./MxDrawObject2d"), w = t("./MxDrawObject3d"), b = t("./MxUiObjectMobile"), _ = t("./MxUiObjectPC"), M = t("./MxJigCmdManager"), S = t("./MxJigGetLine"), C = t("./MxCmdRunManager"), T = t("./MxUiVue"), E = t("./MxThreeJS"), A = t("./MxWindowsEvent"), D = t("./MxTools"), O = t("./MxDrawCommands"), L = t("./MxDrawData"), I = t("./MxCADEditDisplay"), P = t("./MxLocalFileLoad"), R = t("./TempTest/MxTestJig"), k = t("./MxVersion");
6506
+ function N(t) { t.cmd && j(t.cmd); }
6507
+ function B(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
6496
6508
  function F() { return y.MxManager.currentMx(); }
6497
- function z(t, e) { var n = F(); if (n)
6509
+ function z() { return y.MxManager.currentMx(); }
6510
+ function j(t, e) { var n = z(); if (n)
6498
6511
  return C.MxCmdRunManager.runCmd(n, t, e); }
6499
- function j(t) { null != t && (t.init(), T.MxUiVue.init(t)), f || (f = !0, g = new P.MxLocalNodeJs, M.MxJigCmdManager.init(), A.MxWindowsEvent.registEvent(), y.MxManager.init(), O.MxDrawCommands.registerCommand(), window.mxConfig_isLoadTest && R.MxTest.registerCommand(), m.sendStringToExecute = k); }
6500
- p = n.MxFun || (n.MxFun = {}), i = ".", l = o = a = -1, h = null, f = !(u = "ws://localhost:5090"), m = {}, g = d = c = s = r = void 0, p.getUiObj = function () { return h; }, p.getNodeJs = function () { return g; }, p.setMxServer = function (t) { u = t; }, p.getMxServer = function () { return u; }, p.isPC = function () { return !/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); }, p.getClientPlatform = function () { return navigator.platform; }, p.getClientInfo = function () { return { width: document.body.clientWidth, height: document.body.clientHeight }; }, p.curPath = function () { return i; }, p.setCurPath = function (t) { i = t; }, p.getQueryString = N, p.getLocationPageUrl = function () { var t = window.location.href, e = t.lastIndexOf("?"); return -1 == e ? t : t.substring(0, e); }, p.getUrlParams = function () { var t = window.location.search, e = t.substr(1, t.length).split("&"), n = new Array; if (null != e)
6512
+ function V(t) { null != t && (t.init(), T.MxUiVue.init(t)), f || (console.log("MxDraw Version:" + k.MxBulid.getVersion()), f = !0, g = new P.MxLocalNodeJs, M.MxJigCmdManager.init(), A.MxWindowsEvent.registEvent(), y.MxManager.init(), O.MxDrawCommands.registerCommand(), window.mxConfig_isLoadTest && R.MxTest.registerCommand(), m.sendStringToExecute = N); }
6513
+ p = n.MxFun || (n.MxFun = {}), i = ".", l = o = a = -1, h = null, f = !(u = "ws://localhost:5090"), m = {}, g = d = c = s = r = void 0, p.getUiObj = function () { return h; }, p.getNodeJs = function () { return g; }, p.setMxServer = function (t) { u = t; }, p.getMxServer = function () { return u; }, p.isPC = function () { return !/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); }, p.getClientPlatform = function () { return navigator.platform; }, p.getClientInfo = function () { return { width: document.body.clientWidth, height: document.body.clientHeight }; }, p.curPath = function () { return i; }, p.setCurPath = function (t) { i = t; }, p.getQueryString = B, p.getLocationPageUrl = function () { var t = window.location.href, e = t.lastIndexOf("?"); return -1 == e ? t : t.substring(0, e); }, p.getUrlParams = function () { var t = window.location.search, e = t.substr(1, t.length).split("&"), n = new Array; if (null != e)
6501
6514
  for (var i = 0; i < e.length; i++) {
6502
6515
  var r = e[i].replace(/[=|^==]/, "&").split("&");
6503
6516
  if (1 < r.length) {
6504
6517
  var a = new Array;
6505
6518
  a.push(decodeURIComponent(r[0])), a.push(decodeURIComponent(r[1])), n.push(a);
6506
6519
  }
6507
- } return n; }, p.call = function (t, e, n) { null == e ? e = "{}" : "string" == typeof e ? 0 == e.length ? e = "{}" : "[" == e[0] && "]" == e[e.length - 1] || "{" == e[0] && "}" == e[e.length - 1] || (e = '"' + (e = e.replace(/"/g, "'")) + '"') : e = "object" == typeof e ? JSON.stringify(e) : "{}", y.MxManager.currentMx().call(t, e, n); }, p.loadCodeToServer = function (t, e) { y.MxManager.currentMx().loadCodeToServer(t, e); }, p.getCurrentMx = B, p.getCurrentMxCAD = function () { var t = B(); return t ? t.getMxCAD() : null; }, p.openFile = function (t) { return y.MxManager.currentMx().openFile(t); }, p.loadCodeFileToServer = function (t, e, n) { y.MxManager.currentMx().loadCodeFileToServer(t, e, n); }, p.isEnableSelect = function () { if (-1 != a)
6508
- return 1 == a; var t = N("select"); return a = 0, null != t && "y" == t.toLowerCase() && (a = 1), 1 == a; }, p.is3DDwg = function () { if (-1 != l)
6509
- return 1 == l; var t = N("3ddwg"); return l = 0, null != t && "y" == t.toLowerCase() && (l = 1), 1 == l; }, p.isStaticLoad = function () { if (-1 != o)
6510
- return 1 == o; var t = N("static"); return o = 0, null != t && "y" == t.toLowerCase() && (o = 1), 1 == o; }, p.enableSelect = function (t) { a = t ? 1 : 0; }, p.enablStaticLoad = function (t) { o = null == t || t ? 1 : 0; }, p.dwgDir = function () { return null != s || null == (s = N("dwgdir")) && (s = ""), s; }, p.setDwgDir = function (t) { s = t; }, p.getStaticServer = function () { return null != c || null == (c = N("staticServer")) && (c = ""), c; }, p.setStaticServer = function (t) { c = t; }, p.is2dParam = function () { if (null != r)
6511
- return r; var t = N("file"); if (r = !1, null != t) {
6520
+ } return n; }, p.call = function (t, e, n) { null == e ? e = "{}" : "string" == typeof e ? 0 == e.length ? e = "{}" : "[" == e[0] && "]" == e[e.length - 1] || "{" == e[0] && "}" == e[e.length - 1] || (e = '"' + (e = e.replace(/"/g, "'")) + '"') : e = "object" == typeof e ? JSON.stringify(e) : "{}", y.MxManager.currentMx().call(t, e, n); }, p.loadCodeToServer = function (t, e) { y.MxManager.currentMx().loadCodeToServer(t, e); }, p.getCurrentMx = F, p.getCurrentMxCAD = function () { var t = F(); return t ? t.getMxCAD() : null; }, p.openFile = function (t) { return y.MxManager.currentMx().openFile(t); }, p.loadCodeFileToServer = function (t, e, n) { y.MxManager.currentMx().loadCodeFileToServer(t, e, n); }, p.isEnableSelect = function () { if (-1 != a)
6521
+ return 1 == a; var t = B("select"); return a = 0, null != t && "y" == t.toLowerCase() && (a = 1), 1 == a; }, p.is3DDwg = function () { if (-1 != l)
6522
+ return 1 == l; var t = B("3ddwg"); return l = 0, null != t && "y" == t.toLowerCase() && (l = 1), 1 == l; }, p.isStaticLoad = function () { if (-1 != o)
6523
+ return 1 == o; var t = B("static"); return o = 0, null != t && "y" == t.toLowerCase() && (o = 1), 1 == o; }, p.enableSelect = function (t) { a = t ? 1 : 0; }, p.enablStaticLoad = function (t) { o = null == t || t ? 1 : 0; }, p.dwgDir = function () { return null != s || null == (s = B("dwgdir")) && (s = ""), s; }, p.setDwgDir = function (t) { s = t; }, p.getStaticServer = function () { return null != c || null == (c = B("staticServer")) && (c = ""), c; }, p.setStaticServer = function (t) { c = t; }, p.is2dParam = function () { if (null != r)
6524
+ return r; var t = B("file"); if (r = !1, null != t) {
6512
6525
  var e = t.substring(t.lastIndexOf(".") + 1);
6513
6526
  "dwg" != e.toLowerCase() && "dxf" != e.toLowerCase() && "dwf" != e.toLowerCase() && "mwg" != e.toLowerCase() || (r = !0);
6514
6527
  } return r; }, p.set2dParam = function (t) { r = t; }, p.showLayer = function (t, e, n) { var i = y.MxManager.currentMx().getMxCAD(); if (!i)
6515
- return y.MxManager.currentMx().showLayer(t, e, n); "number" == typeof t && I.MxCADDisplayFun.showLayer(i.getDatabase(), t, e); }, p.upDisplayForLayerData = function (t) { var e = y.MxManager.currentMx().getMxCAD(); return !!e && e.getDatabase().getLayerTable().upDisplayForLayerData(e.getDatabase(), t); }, p.screenCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2World(t, e, n); }, p.worldCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Screen(t, e, n); }, p.docCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2World(t, e, n); }, p.worldCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Doc(t, e, n); }, p.screenCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2Doc(t, e, n); }, p.docCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2Screen(t, e, n); }, p.zoomCenter = function (t, e) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomCenter(t, e), y.MxManager.currentMx().updateDisplay()); }, p.zoomW = function (t, e, n, i, r) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomW(new v.Vector3(t, e, 0), new v.Vector3(n, i, 0), r), y.MxManager.currentMx().updateDisplay()); }, p.zoomScale = function (t) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomScale(t), y.MxManager.currentMx().updateDisplay()); }, p.zoomAll = function () { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomAll(), y.MxManager.currentMx().updateDisplay()); }, p.deleteAll = function () { return y.MxManager.currentMx().deleteAll(); }, p.callCommand = function (t, e, n) { y.MxManager.currentMx().callCommand(t, e, n); }, p.getCurrentColor = function () { return y.MxManager.currentMx().getCurrentColor(); }, p.setCurrentColor = function (t) { y.MxManager.currentMx().setCurrentColor(t); }, p.undo = function () { y.MxManager.currentMx().undo(); }, p.save = function () { y.MxManager.currentMx().save(); }, p.showLoading = function () { null != h && h.ShowLoading(); }, p.hideLoading = function () { null != h && h.HideLoading(); }, p.showProp = function (t) { null != h && h.ShowObjectProperty(t); }, p.hideProp = function () { null != h && h.HideObjectProp(); }, p.getUiObject = function () { return h; }, p.getViewCenterDocCoord = function () { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().getViewCenterDocCoord() : new v.Vector3(0, 0, 0); }, p.screenCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2Doc(t) : t; }, p.docCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2Screen(t) : t; }, p.worldCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Doc(t) : t; }, p.docCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2World(t) : t; }, p.screenCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2World(t) : t; }, p.worldCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Screen(t) : t; }, p.addSelectEvent = function (t) { y.MxManager.addSelectEvent(t); }, p.clearSelectEvent = function () { y.MxManager.clearSelectEvent(); }, p.removeThreejsObject = function (t, e, n) { t && (t.traverse(function (t) { (t instanceof v.Mesh || t instanceof v.Line || t instanceof v.LineLoop) && (t.geometry.dispose(), n && (t.material instanceof Array ? t.material.forEach(function (t) { t.dispose(); }) : t.material.dispose())); }), e.remove(t)); }, p.setOutServerDebugCall = function (t) { y.MxManager.setOutDebugCall(t); }, p.updateDisplay = function () { y.MxManager.updateDisplay(); }, p.getCurrentDraw = F, p.formatString = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6528
+ return y.MxManager.currentMx().showLayer(t, e, n); "number" == typeof t && I.MxCADDisplayFun.showLayer(i.getDatabase(), t, e); }, p.upDisplayForLayerData = function (t) { var e = y.MxManager.currentMx().getMxCAD(); return !!e && e.getDatabase().getLayerTable().upDisplayForLayerData(e.getDatabase(), t); }, p.screenCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2World(t, e, n); }, p.worldCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Screen(t, e, n); }, p.docCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2World(t, e, n); }, p.worldCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Doc(t, e, n); }, p.screenCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2Doc(t, e, n); }, p.docCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2Screen(t, e, n); }, p.zoomCenter = function (t, e) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomCenter(t, e), y.MxManager.currentMx().updateDisplay()); }, p.zoomW = function (t, e, n, i, r) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomW(new v.Vector3(t, e, 0), new v.Vector3(n, i, 0), r), y.MxManager.currentMx().updateDisplay()); }, p.zoomScale = function (t) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomScale(t), y.MxManager.currentMx().updateDisplay()); }, p.zoomAll = function () { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomAll(), y.MxManager.currentMx().updateDisplay()); }, p.deleteAll = function () { return y.MxManager.currentMx().deleteAll(); }, p.callCommand = function (t, e, n) { y.MxManager.currentMx().callCommand(t, e, n); }, p.getCurrentColor = function () { return y.MxManager.currentMx().getCurrentColor(); }, p.setCurrentColor = function (t) { y.MxManager.currentMx().setCurrentColor(t); }, p.undo = function () { y.MxManager.currentMx().undo(); }, p.save = function () { y.MxManager.currentMx().save(); }, p.showLoading = function () { null != h && h.ShowLoading(); }, p.hideLoading = function () { null != h && h.HideLoading(); }, p.showProp = function (t) { null != h && h.ShowObjectProperty(t); }, p.hideProp = function () { null != h && h.HideObjectProp(); }, p.getUiObject = function () { return h; }, p.getViewCenterDocCoord = function () { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().getViewCenterDocCoord() : new v.Vector3(0, 0, 0); }, p.screenCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2Doc(t) : t; }, p.docCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2Screen(t) : t; }, p.worldCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Doc(t) : t; }, p.docCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2World(t) : t; }, p.screenCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2World(t) : t; }, p.worldCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Screen(t) : t; }, p.addSelectEvent = function (t) { y.MxManager.addSelectEvent(t); }, p.clearSelectEvent = function () { y.MxManager.clearSelectEvent(); }, p.removeThreejsObject = function (t, e, n) { t && (t.traverse(function (t) { (t instanceof v.Mesh || t instanceof v.Line || t instanceof v.LineLoop) && (t.geometry.dispose(), n && (t.material instanceof Array ? t.material.forEach(function (t) { t.dispose(); }) : t.material.dispose())); }), e.remove(t)); }, p.setOutServerDebugCall = function (t) { y.MxManager.setOutDebugCall(t); }, p.updateDisplay = function () { y.MxManager.updateDisplay(); }, p.getCurrentDraw = z, p.formatString = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6516
6529
  e[n - 1] = arguments[n]; for (var i = 0; i < e.length; i++)
6517
- t = t.replace("{".concat(i, "}"), e[i]); return t; }, p.createMxUiObject = function (t) { var e; return e = this.isPC() ? new _.MxUiObjectPC : new b.MxUiObjectMobile, t(h = e), e.create(), e; }, p.createMxObject = function (t, e, n, i, r, a) { f || j(), "string" == typeof t && (t = 0 == t.length ? void 0 : document.getElementById(t)), null == e && (e = p.getQueryString("file")); var o = null != i && i; if (null != e) {
6530
+ t = t.replace("{".concat(i, "}"), e[i]); return t; }, p.createMxUiObject = function (t) { var e; return e = this.isPC() ? new _.MxUiObjectPC : new b.MxUiObjectMobile, t(h = e), e.create(), e; }, p.createMxObject = function (t, e, n, i, r, a) { f || V(), "string" == typeof t && (t = 0 == t.length ? void 0 : document.getElementById(t)), null == e && (e = p.getQueryString("file")); var o = null != i && i; if (null != e) {
6518
6531
  0 == e.length && (e = "empty");
6519
6532
  var s = e.substring(e.lastIndexOf(".") + 1).toLowerCase();
6520
6533
  if ("dwg" != s && "dxf" != s && "dwf" != s && "mwg" != s && "wgh" != s || (o = !0), 1 != a && null != a && "wgh" != s) {
@@ -6526,7 +6539,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6526
6539
  }
6527
6540
  }
6528
6541
  else
6529
- e = "empty"; 1 == r && (e = ""); var d = null; return o ? (d = new x.MxDrawObject2d).setViewColor(0) : (d = new w.MxDrawObject3d).setViewColor(15790320), null != n && n(d), d.create(t, e), d; }, p.getMxObjectFormElement = function (t) { return y.MxManager.getMxObject(t); }, p.isRunningCommand = function () { return M.MxJigCmdManager.isRunning(); }, p.stopRunCommand = function () { return M.MxJigCmdManager.stopCmd(); }, p.runCommand = function (t) { return M.MxJigCmdManager.runCmd(t); }, p.getTHREE = function () { return v; }, p.getLine = function (t) { var e = new S.MxJigGetLine; e.setRetCall(t), M.MxJigCmdManager.runCmd(e); }, p.addCommand = function (t, e, n) { C.MxCmdRunManager.addCommand(t, e, n); }, p.sendStringToExecute = z, p.initUiDataObject = function (t) { t.init(p), T.MxUiVue.init(t); }, p.init = j, p.addWindowsEvent = function (t) { A.MxWindowsEvent.addEvent(t); }, p.getCurrentMousePostion = function () { return A.MxWindowsEvent.getCurrentMousePostion(); }, p.getMxThreeJS = function () { return E.MxThreeJS; }, p.getMxTools = function () { return D.MxTools; }, p.getMxCmdRunManager = function () { return C.MxCmdRunManager; }, p.getMxJigCmdManager = function () { return M.MxJigCmdManager; }, p.initQuickCommand = function (t) { C.MxCmdRunManager.InitQuickCommand(t); }, p.Assert = function (t) { t || console.log("MxAssert error"); }, p.setIniset = function (t) { L.MxDrawData.setIniset(t); }, p.setPostMessageToParentFrameFunction = function (t) { d = t; }, p.postMessageToParentFrame = function (t) { return null != d && (d(t), !0); }, p.onParentFrameMessage = function (t) { null != t && null != t.type && m[t.type] && m[t.type](t); }, p.acutPrintf = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6542
+ e = "empty"; 1 == r && (e = ""); var d = null; return o ? (d = new x.MxDrawObject2d).setViewColor(0) : (d = new w.MxDrawObject3d).setViewColor(15790320), null != n && n(d), d.create(t, e), d; }, p.getMxObjectFormElement = function (t) { return y.MxManager.getMxObject(t); }, p.isRunningCommand = function () { return M.MxJigCmdManager.isRunning(); }, p.stopRunCommand = function () { return M.MxJigCmdManager.stopCmd(); }, p.runCommand = function (t) { return M.MxJigCmdManager.runCmd(t); }, p.getTHREE = function () { return v; }, p.getLine = function (t) { var e = new S.MxJigGetLine; e.setRetCall(t), M.MxJigCmdManager.runCmd(e); }, p.addCommand = function (t, e, n) { C.MxCmdRunManager.addCommand(t, e, n); }, p.sendStringToExecute = j, p.initUiDataObject = function (t) { t.init(p), T.MxUiVue.init(t); }, p.init = V, p.addWindowsEvent = function (t) { A.MxWindowsEvent.addEvent(t); }, p.getCurrentMousePostion = function () { return A.MxWindowsEvent.getCurrentMousePostion(); }, p.getMxThreeJS = function () { return E.MxThreeJS; }, p.getMxTools = function () { return D.MxTools; }, p.getMxCmdRunManager = function () { return C.MxCmdRunManager; }, p.getMxJigCmdManager = function () { return M.MxJigCmdManager; }, p.initQuickCommand = function (t) { C.MxCmdRunManager.InitQuickCommand(t); }, p.Assert = function (t) { t || console.log("MxAssert error"); }, p.setIniset = function (t) { L.MxDrawData.setIniset(t); }, p.setPostMessageToParentFrameFunction = function (t) { d = t; }, p.postMessageToParentFrame = function (t) { return null != d && (d(t), !0); }, p.onParentFrameMessage = function (t) { null != t && null != t.type && m[t.type] && m[t.type](t); }, p.acutPrintf = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6530
6543
  e[n - 1] = arguments[n]; if (!T.MxUiVue.isNull()) {
6531
6544
  for (var i = arguments, r = i[0], a = 0; a < i.length - 1; a++) {
6532
6545
  var o = new RegExp("\\{" + a + "\\}", "gm");
@@ -6534,7 +6547,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6534
6547
  }
6535
6548
  T.MxUiVue.AcutPrintfNoFormat(r, !0);
6536
6549
  } }, p.loadImageMaterial = function (t, e) { y.MxManager.getMxDbTextureManager().loadImage(t, e); }, p.pointInPolyline = function (t, e) { return D.MxTools.pointInPolyline(t, e); }, p.calcArea = function (t) { return D.MxTools.calcArea(t); }, p.initMxDbEntityType = function (t) { y.MxManager.getMxDbEntityClassHierarchy().init(t); };
6537
- }, { "./MxCADEditDisplay": 26, "./MxCmdRunManager": 33, "./MxDrawCommands": 39, "./MxDrawData": 40, "./MxDrawObject2d": 42, "./MxDrawObject3d": 43, "./MxJigCmdManager": 48, "./MxJigGetLine": 49, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxThreeJS": 58, "./MxTools": 59, "./MxUiObjectMobile": 62, "./MxUiObjectPC": 63, "./MxUiVue": 64, "./MxWindowsEvent": 65, "./TempTest/MxTestJig": 67, three: 19 }], 46: [function (t, e, n) {
6550
+ }, { "./MxCADEditDisplay": 26, "./MxCmdRunManager": 33, "./MxDrawCommands": 39, "./MxDrawData": 40, "./MxDrawObject2d": 42, "./MxDrawObject3d": 43, "./MxJigCmdManager": 48, "./MxJigGetLine": 49, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxThreeJS": 58, "./MxTools": 59, "./MxUiObjectMobile": 62, "./MxUiObjectPC": 63, "./MxUiVue": 64, "./MxVersion": 65, "./MxWindowsEvent": 66, "./TempTest/MxTestJig": 68, three: 19 }], 46: [function (t, e, n) {
6538
6551
  "use strict";
6539
6552
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6540
6553
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6602,7 +6615,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6602
6615
  } this._mxObject.updateDisplay(); }, d.prototype.getCurrentMouseButton = function () { return a.MxJigCmdManager.getCurrentMouseButton(); }, d.prototype.userInputControls = function () { return this._userInputContros; }, d.prototype.setUserInputControls = function (t) { this._userInputContros = t; }, d);
6603
6616
  function d() { this._isExit = !1, this._aryDynDrawObjectNamesId = void 0, this._DynNameId = 1, this._iColor = 16777215, this._isCancle = !1, this.m_isDisableDynInput = !1, this.m_isDisableOsnap = !1, this.m_dynInput = new c(this), this.m_osnap = new r.McEdJigOsnap(this), this._userInputContros = a.MxJigCmdManager.UserInputControls.kNullResponseAccepted, this.m_isOffsetInputPostion = !1, this.m_isReserveDrawStatus = !1, this.m_callReserveDrawAddEntity = null, this._mxObject = null; }
6604
6617
  n.McEdJigCommand = h;
6605
- }, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 65, three: 19 }], 48: [function (t, e, n) {
6618
+ }, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 66, three: 19 }], 48: [function (t, e, n) {
6606
6619
  "use strict";
6607
6620
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxJigCmdManager = n.AcquireReturn = void 0;
6608
6621
  var i, X = t("three"), Y = t("./MxFun"), Z = t("./MxJig"), $ = t("./MxManager"), K = t("./MrxDbgUiPrPoint"), Q = t("./MrxDbgUiPrBase"), tt = t("./MxUiVue"), et = t("./MxTools"), nt = t("./MxString"), it = t("./MxWindowsEvent"), rt = t("./MxDrawObject"), at = t("./McEdJigOsnap"), ot = t("./MxDrawData"), st = function () { this.status = i.DragStatus.kNoChange, this.exit = !0, this.sKeyValue = ""; };
@@ -6696,7 +6709,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6696
6709
  t.setMxObject(e), C = it.MxWindowsEvent.getCurrentMousePostion(), E && E(), null == w ? (V(), w = t, S = u.kInvalid, w.onStartCommand(), G(e)) : (b = t, T = !0, w.notifyCancleExit(), T = !1);
6697
6710
  } }, r.GetAcqurePointFromStringTo = H, r.ProcCommandRetResult = J, r.GetCommandLineContent = q, r.acquirePoint = function (t) { var e = new st; if (null == w)
6698
6711
  return e.status = l.kCancel, e; var n = q(f.COMMAND_GET_COORD | f.COMMAND_GET_KEY); return n.iRet == d.COMMAND_IN_EMTPY ? (e.status = l.kNull, e.exit = !0) : n.iRet == d.COMMAND_IN_KEY ? (e.status = n.iKey, e.exit = !0, e.sKeyValue = n.sValue) : n.iRet == d.COMMAND_IN_COORD ? (e.status = l.kNormal, e.pt = new X.Vector3(n.pt.x, n.pt.y, n.pt.z), e.exit = !0) : (J(n.iRet, "\n 需要点或选项关键字。 \n"), M == a.kMove ? (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kEnd ? t & o.kGetEnd ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kCancle ? (e.status = l.kCancel, e.pt = x, e.exit = !0) : M == a.kBegan ? t & o.kGetBegan ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kMouseDown ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNoChange, e.pt = void 0, e.exit = !1)), e; }, r.getMcEdJigCommandClass = function () { return Z.McEdJigCommand; }, r.getMrxDbgUiPrPointClass = function () { return K.MrxDbgUiPrPoint; }, r.getMcEdGetPointWorldDrawClass = function () { return Q.McEdGetPointWorldDraw; }, r.McEdGetPointWorldDrawObjectClass = function () { return Q.McEdGetPointWorldDrawObject; }, r.init = function () { this._curCmd = void 0; }; }(i = n.MxJigCmdManager || (n.MxJigCmdManager = {}));
6699
- }, { "./McEdJigOsnap": 20, "./MrxDbgUiPrBase": 22, "./MrxDbgUiPrPoint": 23, "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJig": 47, "./MxManager": 51, "./MxString": 56, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 65, three: 19 }], 49: [function (t, e, n) {
6712
+ }, { "./McEdJigOsnap": 20, "./MrxDbgUiPrBase": 22, "./MrxDbgUiPrPoint": 23, "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJig": 47, "./MxManager": 51, "./MxString": 56, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 66, three: 19 }], 49: [function (t, e, n) {
6700
6713
  "use strict";
6701
6714
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6702
6715
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6926,7 +6939,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6926
6939
  "use strict";
6927
6940
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxThreeJS = void 0;
6928
6941
  var i, m = t("three"), g = t("./MxFun");
6929
- (i = n.MxThreeJS || (n.MxThreeJS = {})).createLine = function (t, e, n, i) { var r, a = new m.Geometry; return r = i || 0 == i ? new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1, opacity: i }) : new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }), a.vertices.push(t, e), new m.Line(a, r); }, i.createCircle = function (t, e, n) { var i = new m.CircleGeometry(e, 64, 3, 2 * Math.PI), r = new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }); i.vertices.shift(); var a = new m.LineLoop(i, r); return a.position.x = t.x, a.position.y = t.y, a.position.z = t.z, a; }, i.creatTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = g.MxFun.formatString("normal {0}px Arial", "256"); if (null == s)
6942
+ (i = n.MxThreeJS || (n.MxThreeJS = {})).createLine = function (t, e, n, i) { var r, a = new m.Geometry; return r = i && 1 != i || 0 == i ? new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1, opacity: i }) : new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }), a.vertices.push(t, e), new m.Line(a, r); }, i.createCircle = function (t, e, n) { var i = new m.CircleGeometry(e, 64, 3, 2 * Math.PI), r = new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }); i.vertices.shift(); var a = new m.LineLoop(i, r); return a.position.x = t.x, a.position.y = t.y, a.position.z = t.z, a; }, i.creatTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = g.MxFun.formatString("normal {0}px Arial", "256"); if (null == s)
6930
6943
  return null; s.font = l; var c, u = s.measureText(t); a = 2 * (c = u.width, Math.pow(2, Math.floor(Math.log(c) / Math.LN2))), o.width = a, o.height = 256, s.font = l, s.textAlign = "center", s.textBaseline = "middle"; var h = g.MxFun.formatString("rgba({0}, {1}, {2}, 1.0)", (r >> 16 & 255) + "", (r >> 8 & 255) + "", (255 & r) + ""); s.fillStyle = h, s.fillText(t, a / 2, 128); var d = new m.Texture(o); d.needsUpdate = !0; var p = new m.SpriteMaterial({ transparent: !0, depthTest: !1, map: d }); p.rotation = i; var f = new m.Sprite(p); return f.scale.set(a / 256 * n, n, 1), f.position.set(e.x, e.y, e.z), f; }, i.createTriangle = function (t, e, n) { if (!(t.length < 3)) {
6931
6944
  for (var i = t.length, r = new m.Geometry, a = 0; a + 2 < i; a += 3) {
6932
6945
  r.vertices.push(t[a]), r.vertices.push(t[a + 1]), r.vertices.push(t[a + 2]);
@@ -6936,7 +6949,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6936
6949
  r.computeFaceNormals(), r.computeVertexNormals(), null == n && (n = 1);
6937
6950
  var s = new m.MeshBasicMaterial({ color: e, transparent: !0, depthTest: !1, side: m.DoubleSide, opacity: n });
6938
6951
  return new m.Mesh(r, s);
6939
- } }, i.createLines = function (t, e, n) { var i, r = new m.Geometry; return r.vertices = t, i = n || 0 == n ? new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1, opacity: n }) : new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1 }), new m.Line(r, i); }, i.createDashedLines = function (t, e, n, i) { var r = new m.Geometry; r.vertices = t; var a = new m.Line(r, new m.LineDashedMaterial({ color: e, dashSize: n, gapSize: i, transparent: !0, depthTest: !1 })); return a.computeLineDistances(), a; };
6952
+ } }, i.createLines = function (t, e, n) { var i, r = new m.Geometry; return r.vertices = t, i = n && 1 != n || 0 == n ? new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1, opacity: n }) : new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1 }), new m.Line(r, i); }, i.createDashedLines = function (t, e, n, i) { var r = new m.Geometry; r.vertices = t; var a = new m.Line(r, new m.LineDashedMaterial({ color: e, dashSize: n, gapSize: i, transparent: !0, depthTest: !1 })); return a.computeLineDistances(), a; };
6940
6953
  }, { "./MxFun": 45, three: 19 }], 59: [function (t, e, n) {
6941
6954
  "use strict";
6942
6955
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxPair = n.MxTools = void 0;
@@ -6950,7 +6963,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6950
6963
  return !1; for (var r = i - 1, a = 0, o = t.x, s = t.y; a < i; ++a)
6951
6964
  (e[a].y <= s && s < e[r].y || e[r].y <= s && s < e[a].y) && o - e[a].x < (e[r].x - e[a].x) * (s - e[a].y) / (e[r].y - e[a].y) && (n = !n), r = a; return n; }, i.calcArea = function (t) { var e = 0, n = !0, i = new Array(2), r = new s.Vector3, a = t.length; if (t.length < 2)
6952
6965
  return e; for (var o = 0; o < a; o++)
6953
- i[0] = i[1], i[1] = t[o], n ? (r = i[1], n = !1) : e += .5 * (i[1].x - i[0].x) * (i[0].y - r.y + (i[1].y - r.y)); return e < 0 && (e = -e), e; };
6966
+ i[0] = i[1], i[1] = t[o], n ? (r = i[1], n = !1) : e += .5 * (i[1].x - i[0].x) * (i[0].y - r.y + (i[1].y - r.y)); return e < 0 && (e = -e), e; }, i.MxASSERT = function (t, e) { t || console.log("MxASSERT(0):" + e); };
6954
6967
  function r(t, e) { this.first = t, this.second = e; }
6955
6968
  n.MxPair = r;
6956
6969
  }, { three: 19 }], 60: [function (t, e, n) {
@@ -7121,6 +7134,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7121
7134
  } }, i.DynamicInput_upDisplay = function () { null != d && i.OnMxEvent({ name: "dynInputUpDisplay" }); }, i.DynamicInput_setType = function (t) { null != d && d.getDynamicInput().setType(t); }, i.DynamicInput_getType = function () { return null == d ? o.MxJigCmdManager.DynamicInputType.kNoInput : d.getDynamicInput().getType(); }, i.DynamicInput_setPos = function (t) { null != d && d.getDynamicInput().setPos([t.x, t.y]); }, i.DynamicInput_setTip = function (t) { null != d && d.getDynamicInput().setTip(t); }, i.DynamicInput_setValue1 = function (t) { null != d && d.getDynamicInput().setValue1(t); }, i.DynamicInput_getValue1 = function () { return null == d ? "" : d.getDynamicInput().getValue1(); }, i.DynamicInput_setValue1Pos = function (t) { null != d && d.getDynamicInput().setValue1Pos([t.x, t.y]); }, i.DynamicInput_setValue2 = function (t) { null != d && d.getDynamicInput().setValue2(t); }, i.DynamicInput_getValue2 = function () { return null == d ? "" : d.getDynamicInput().getValue2(); }, i.DynamicInput_getFocusValue = function () { return null == d ? "" : d.getDynamicInput().getFocusValue(); }, i.DynamicInput_setValue2Pos = function (t) { null != d && d.getDynamicInput().setValue2Pos([t.x, t.y]); }, i.DynamicInput_setShow = function (t) { null != d && d.getDynamicInput().setShow(t); }, i.DynamicInput_isShow = function () { return null != d && d.getDynamicInput().isShow(); }, i.OnMxEvent = function (t) { if (null == d)
7122
7135
  return !1; d.OnMxEvent(t); };
7123
7136
  }, { "./MxCmdRunManager": 33, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59 }], 65: [function (t, e, n) {
7137
+ "use strict";
7138
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxBulid = void 0, window.MxDrawVersion = "1.0(2022-04-23 17:25)", (n.MxBulid || (n.MxBulid = {})).getVersion = function () { return window.MxDrawVersion ? window.MxDrawVersion : "inalid version"; };
7139
+ }, {}], 66: [function (t, e, n) {
7124
7140
  "use strict";
7125
7141
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxWindowsEvent = void 0;
7126
7142
  var i, r, s, a, l = t("./MxFun"), c = t("./MxManager"), u = t("./MxJigCmdManager"), h = t("three"), o = t("./MxUiVue"), d = t("./MxDrawData");
@@ -7177,7 +7193,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7177
7193
  else
7178
7194
  u.MxJigCmdManager.isRunning() && u.MxJigCmdManager.stopCmd(); }
7179
7195
  i = n.MxWindowsEvent || (n.MxWindowsEvent = {}), r = !1, s = new h.Vector2(0, 0), a = new Array, i.addEvent = function (t) { a.push(t); }, i.getCurrentMousePostion = function () { return s; }, i.registEvent = function () { r || (r = !0, l.MxFun.isPC() && (document.addEventListener("mousemove", f, !1), document.addEventListener("mouseup", m, !1), document.addEventListener("mousedown", g, !1), document.onkeydown = v)); };
7180
- }, { "./MxDrawData": 40, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxUiVue": 64, three: 19 }], 66: [function (e, t, n) {
7196
+ }, { "./MxDrawData": 40, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxUiVue": 64, three: 19 }], 67: [function (e, t, n) {
7181
7197
  "use strict";
7182
7198
  Object.defineProperty(n, "__esModule", { value: !0 });
7183
7199
  var i = e("./MxFun");
@@ -7187,7 +7203,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7187
7203
  var t = i.MxFun.getUiObject();
7188
7204
  null != t && t.writeUICSS();
7189
7205
  } "undefined" == typeof MxDocumentReady ? $(document).ready(function () { r.CreateMx(); }) : MxDocumentReady(e, r.CreateMx); }, r).Main();
7190
- }, { "./MxFun": 45 }], 67: [function (t, e, n) {
7206
+ }, { "./MxFun": 45 }], 68: [function (t, e, n) {
7191
7207
  "use strict";
7192
7208
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
7193
7209
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -7222,5 +7238,5 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7222
7238
  }
7223
7239
  return 0;
7224
7240
  } }); };
7225
- }, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [66]); }
7241
+ }, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [67]); }
7226
7242
  exports.default = mxfun;
@@ -7,9 +7,7 @@ var options = {
7
7
  MxFun: null,
8
8
  Mxassembly: null,
9
9
  /* 是否创建了mxdrawObj实例 MxFun.createMxObject */
10
- isCreateDrawObj: false,
11
- /* 是否加载了canvas大小侦听器 */
12
- isLoadCanvasResizeListene: false
10
+ isCreateDrawObj: false
13
11
  },
14
12
  actions: {},
15
13
  mutations: {}
@@ -55,7 +55,7 @@ function useCanvasResizeListener(mxdrawObj, canvas, time, autoAdjust, callback)
55
55
  if (time === void 0) { time = 100; }
56
56
  if (autoAdjust === void 0) { autoAdjust = true; }
57
57
  return __awaiter(this, void 0, void 0, function () {
58
- var MxFun;
58
+ var MxFun, mxObj;
59
59
  return __generator(this, function (_a) {
60
60
  switch (_a.label) {
61
61
  case 0:
@@ -68,17 +68,24 @@ function useCanvasResizeListener(mxdrawObj, canvas, time, autoAdjust, callback)
68
68
  console.error('请确保mxdrawObj参数 是通过调用MxFun.createMxObject的callback回调函数拿到的mxDraw对象');
69
69
  return [2 /*return*/];
70
70
  }
71
- if (!!store_1.default.state.isLoadCanvasResizeListene) return [3 /*break*/, 2];
72
- mxdrawObj.addEvent('addResizeEvent', function (callResize) {
73
- (0, create_1.createCanvasParent)(canvas).addEventListener('resize', _.throttle(function (event) {
74
- callback && callback(event);
75
- autoAdjust && callResize(event);
76
- }, time), false);
77
- });
71
+ mxObj = mxdrawObj;
72
+ if (!!mxObj['isLoadCanvasResizeListene']) return [3 /*break*/, 2];
73
+ mxObj['isLoadCanvasResizeListene'] = true;
78
74
  return [4 /*yield*/, (0, dynamicImport_1.dynamicImport)('element-resize-event-polyfill')];
79
75
  case 1:
80
76
  _a.sent();
81
- store_1.default.commit('setIsLoadCanvasResizeListene', true);
77
+ mxdrawObj.addEvent('addResizeEvent', function (callResize) {
78
+ var parentdiv = (0, create_1.createCanvasParent)(canvas);
79
+ if (parentdiv['addEventListener']) {
80
+ (0, create_1.createCanvasParent)(canvas).addEventListener('resize', _.throttle(function (event) {
81
+ callback && callback(event);
82
+ autoAdjust && callResize(event);
83
+ }, time), false);
84
+ }
85
+ else {
86
+ console.log('mx: parentdiv[addEventListener] invalid');
87
+ }
88
+ });
82
89
  _a.label = 2;
83
90
  case 2: return [2 /*return*/];
84
91
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MxType = exports.MrxDbgUiPrBaseReturn = exports.McGiWorldDrawType = exports.store = exports.loadCoreCode = exports.useCanvasResizeListener = exports.MxDbAlignedDimension = exports.MxDbRect = exports.MxDbSVG = exports.MxDbLine = exports.MxDbImage = exports.MxFilters = exports.MxDbEntity = exports.MrxDbgUiPrPoint = exports.McEdGetPointWorldDrawObject = exports.MxThreeJS = exports.Mxassembly = exports.MxFun = void 0;
3
+ exports.MxType = exports.MrxDbgUiPrBaseReturn = exports.McGiWorldDrawType = exports.store = exports.loadCoreCode = exports.useCanvasResizeListener = exports.MxDbAlignedDimension = exports.MxDbRect = exports.MxDbSVGText = exports.MxDbSVG = exports.MxDbLine = exports.MxDbImage = exports.MxFilters = exports.MxDbEntity = exports.MrxDbgUiPrPoint = exports.McEdGetPointWorldDrawObject = exports.MxThreeJS = exports.Mxassembly = exports.MxFun = void 0;
4
4
  //src/index.ts
5
5
  var loadCoreCode_1 = require("./MxModule/loadCoreCode");
6
6
  exports.loadCoreCode = loadCoreCode_1.default;
@@ -24,6 +24,8 @@ var MxDbImage_1 = require("./MxModule/MxDbImage");
24
24
  exports.MxDbImage = MxDbImage_1.default;
25
25
  var MxDbSVG_1 = require("./MxModule/MxDbSVG");
26
26
  exports.MxDbSVG = MxDbSVG_1.default;
27
+ var MxDbSVGText_1 = require("./MxModule/MxDbSVGText");
28
+ exports.MxDbSVGText = MxDbSVGText_1.default;
27
29
  var MxDbLine_1 = require("./MxModule/MxDbLine");
28
30
  exports.MxDbLine = MxDbLine_1.default;
29
31
  var MxDbRect_1 = require("./MxModule/MxDbRect");
@@ -50,6 +52,7 @@ exports.default = {
50
52
  MxDbImage: MxDbImage_1.default,
51
53
  MxDbLine: MxDbLine_1.default,
52
54
  MxDbSVG: MxDbSVG_1.default,
55
+ MxDbSVGText: MxDbSVGText_1.default,
53
56
  MxDbRect: MxDbRect_1.default,
54
57
  MxDbAlignedDimension: MxDbAlignedDimension_1.default,
55
58
  useCanvasResizeListener: useCanvasResizeListener_1.default,
@@ -77,7 +77,7 @@ function dynamicImportResize() {
77
77
  case 1: return [2 /*return*/, _a.sent()];
78
78
  case 2:
79
79
  e_1 = _a.sent();
80
- console.log("require动态导入:" + 'element-resize-event-polyfill' + '失败!' + '正在尝试使用import');
80
+ console.log('require动态导入:' + 'element-resize-event-polyfill' + '失败!' + '正在尝试使用import');
81
81
  _a.label = 3;
82
82
  case 3:
83
83
  _a.trys.push([3, 5, , 6]);
@@ -93,7 +93,7 @@ function dynamicImportResize() {
93
93
  return [3 /*break*/, 6];
94
94
  case 5:
95
95
  e_2 = _a.sent();
96
- console.log("import动态导入:" + 'element-resize-event-polyfill' + '失败!', e_2);
96
+ console.log('import动态导入:' + 'element-resize-event-polyfill' + '失败!', e_2);
97
97
  return [3 /*break*/, 6];
98
98
  case 6: return [3 /*break*/, 7];
99
99
  case 7: return [2 /*return*/];
@@ -112,11 +112,11 @@ function dynamicImportJquery() {
112
112
  _a.trys.push([0, 2, , 7]);
113
113
  return [4 /*yield*/, require('jquery')];
114
114
  case 1:
115
- // @ts-ignore
115
+ // @ts-ignore
116
116
  return [2 /*return*/, _a.sent()];
117
117
  case 2:
118
118
  e_3 = _a.sent();
119
- console.log("require动态导入:" + 'jquery' + '失败!' + '正在尝试使用import');
119
+ console.log('require动态导入:' + 'jquery' + '失败!' + '正在尝试使用import');
120
120
  _a.label = 3;
121
121
  case 3:
122
122
  _a.trys.push([3, 5, , 6]);
@@ -132,7 +132,7 @@ function dynamicImportJquery() {
132
132
  return [3 /*break*/, 6];
133
133
  case 5:
134
134
  e_4 = _a.sent();
135
- console.log("import动态导入:" + 'jquery' + '失败!', e_4);
135
+ console.log('import动态导入:' + 'jquery' + '失败!', e_4);
136
136
  return [3 /*break*/, 6];
137
137
  case 6: return [3 /*break*/, 7];
138
138
  case 7: return [2 /*return*/];
@@ -57,6 +57,9 @@ function getToGenerateRoundedCorners(points, cornerRadius, isClose) {
57
57
  if (isClose === void 0) { isClose = true; }
58
58
  if (cornerRadius.length > 0) {
59
59
  var curve = new three_1.CurvePath();
60
+ if (!isClose) {
61
+ points.push(points[0]);
62
+ }
60
63
  for (var i = 0; i < points.length - 1; i++) {
61
64
  //作为拐弯的弧度
62
65
  var R = cornerRadius[i] || 0;
@@ -65,16 +68,17 @@ function getToGenerateRoundedCorners(points, cornerRadius, isClose) {
65
68
  dir.normalize();
66
69
  var p2_1 = points[1].clone();
67
70
  p2_1.add(dir.clone().multiplyScalar(R));
68
- var line_1 = new three_1.LineCurve3(points[0], p2_1);
69
- curve.curves.push(line_1);
71
+ var line = new three_1.LineCurve3(points[0], p2_1);
72
+ curve.curves.push(line);
70
73
  continue;
71
74
  }
72
75
  // 计算三个点构成的两条线的方向
73
- var dir1 = !isClose && points[i - 1]
76
+ var dir1 = !isClose || points[i - 1]
74
77
  ? points[i - 1].clone().sub(points[i])
75
78
  : points[points.length - 1].clone().sub(points[0]);
76
79
  dir1.normalize();
77
- var dir2 = !isClose && points[i + 1]
80
+ /* istanbul ignore next */
81
+ var dir2 = !isClose || points[i + 1]
78
82
  ? points[i + 1].clone().sub(points[i])
79
83
  : points[1].clone().sub(points[0]);
80
84
  dir2.normalize();
@@ -84,24 +88,26 @@ function getToGenerateRoundedCorners(points, cornerRadius, isClose) {
84
88
  var p2 = points[i].clone();
85
89
  var p3 = points[i].clone().add(dir2.clone().multiplyScalar(R));
86
90
  var beziercurve = new three_1.QuadraticBezierCurve3(p1, p2, p3);
87
- var line1 = points[i].clone();
88
- line1.add(dir2.clone().multiplyScalar(R));
89
- var line2 = points[i + 1].clone();
90
- if (i < points.length - (isClose ? 1 : 2)) {
91
- //最后一段不用减掉半径尺寸
92
- line2.add(dir2.clone().multiplyScalar(-R));
91
+ if (i === points.length - 2) {
92
+ var line1 = points[i].clone();
93
+ line1.add(dir2.clone().multiplyScalar(R));
94
+ var line2 = points[i + 1].clone();
95
+ isClose ? line2.add(dir2.clone().multiplyScalar(-R)) : line2.add(dir2.clone());
96
+ var line = new three_1.LineCurve3(line1, line2);
97
+ curve.curves.push(beziercurve, line);
98
+ }
99
+ else {
100
+ // 把转换曲线和直线插入曲线中
101
+ curve.curves.push(beziercurve);
93
102
  }
94
- var line = new three_1.LineCurve3(line1, line2);
95
- // 把转换曲线和直线插入曲线中
96
- curve.curves.push(beziercurve, line);
97
103
  if (i === 0) {
98
104
  points.push(points[0]);
99
105
  }
100
106
  }
101
- return curve.getPoints(5);
107
+ return curve.getPoints(50);
102
108
  }
103
109
  else {
104
- return [];
110
+ return points;
105
111
  }
106
112
  }
107
113
  exports.getToGenerateRoundedCorners = getToGenerateRoundedCorners;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- ;