mxdraw 0.1.4 → 0.1.8
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.
- package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +18 -1
- package/dist/lib/MxModule/MxDbImage/MxDbImage.js +18 -6
- package/dist/lib/MxModule/MxFun/MxFun.js +7 -2
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +26 -23
- package/dist/lib/MxModule/store/store.js +1 -3
- package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +16 -9
- package/dist/lib/doc.js +3 -1
- package/dist/lib/mxdraw.js +4 -1
- package/dist/lib/tools/dynamicImport/index.js +5 -5
- package/dist/lib/types/MxCADObject.js +0 -1
- package/dist/mxdraw.es5.js +3 -3
- package/dist/mxdraw.es5.js.map +1 -1
- package/dist/mxdraw.umd.js +3 -3
- package/dist/mxdraw.umd.js.map +1 -1
- package/dist/types/MxModule/McGiWorldDraw/index.d.ts +1 -1
- package/dist/types/MxModule/McGiWorldDrawType/index.d.ts +1 -1
- package/dist/types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts +1 -1
- package/dist/types/MxModule/MxFun/MxFun.d.ts +2 -1
- package/dist/types/MxModule/store/store.d.ts +0 -1
- package/dist/types/doc.d.ts +2 -1
- package/dist/types/mxdraw.d.ts +3 -1
- package/dist/types/types/MxCADObject.d.ts +5 -5
- package/package.json +1 -1
|
@@ -109,7 +109,24 @@ var MrxDbgUiPrPoint = /** @class */ (function () {
|
|
|
109
109
|
* @returns void
|
|
110
110
|
*/
|
|
111
111
|
MrxDbgUiPrPoint.prototype.go = function (retcall) {
|
|
112
|
-
|
|
112
|
+
if (retcall) {
|
|
113
|
+
_MrxDbgUiPrPoint.go(retcall);
|
|
114
|
+
return new Promise(function (resolve, reject) {
|
|
115
|
+
resolve(null);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
return new Promise(function (resolve, reject) {
|
|
120
|
+
_MrxDbgUiPrPoint.go(function (status) {
|
|
121
|
+
if (status != 0) {
|
|
122
|
+
resolve(null);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
resolve(_MrxDbgUiPrPoint.value());
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
113
130
|
};
|
|
114
131
|
/**
|
|
115
132
|
* 动态拖动,连续取点,直到ESC退出。
|
|
@@ -47,11 +47,11 @@ var MxDbImage = /** @class */ (function (_super) {
|
|
|
47
47
|
var _this = this;
|
|
48
48
|
var pt3 = new THREE.Vector3(this.pt1.x, this.pt2.y);
|
|
49
49
|
var pt4 = new THREE.Vector3(this.pt2.x, this.pt1.y);
|
|
50
|
-
pWorldDraw.drawLine(this.pt1, pt3);
|
|
51
|
-
pWorldDraw.drawLine(pt3, this.pt2);
|
|
52
|
-
pWorldDraw.drawLine(this.pt2, pt4);
|
|
53
|
-
pWorldDraw.drawLine(pt4, this.pt1);
|
|
54
50
|
if (pWorldDraw.getType() == 1) {
|
|
51
|
+
pWorldDraw.drawSelectLine(this.pt1, pt3);
|
|
52
|
+
pWorldDraw.drawSelectLine(pt3, this.pt2);
|
|
53
|
+
pWorldDraw.drawSelectLine(this.pt2, pt4);
|
|
54
|
+
pWorldDraw.drawSelectLine(pt4, this.pt1);
|
|
55
55
|
// 图片正常的显示绘制.
|
|
56
56
|
if (this.material) {
|
|
57
57
|
var w = Math.abs(this.pt1.x - this.pt2.x);
|
|
@@ -70,7 +70,7 @@ var MxDbImage = /** @class */ (function (_super) {
|
|
|
70
70
|
}
|
|
71
71
|
else if (this.imagePath.length > 0 && this.isLoadMaterialFromPath) {
|
|
72
72
|
var myThis_1 = this;
|
|
73
|
-
MxFun_1.default.loadImageMaterial(
|
|
73
|
+
MxFun_1.default.loadImageMaterial(this.imagePath, function (material) {
|
|
74
74
|
_this.isLoadMaterialFromPath = false;
|
|
75
75
|
if (!material) {
|
|
76
76
|
return;
|
|
@@ -81,6 +81,12 @@ var MxDbImage = /** @class */ (function (_super) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
else {
|
|
85
|
+
pWorldDraw.drawLine(this.pt1, pt3);
|
|
86
|
+
pWorldDraw.drawLine(pt3, this.pt2);
|
|
87
|
+
pWorldDraw.drawLine(this.pt2, pt4);
|
|
88
|
+
pWorldDraw.drawLine(pt4, this.pt1);
|
|
89
|
+
}
|
|
84
90
|
};
|
|
85
91
|
MxDbImage.prototype.setImagePath = function (sPath) {
|
|
86
92
|
this.imagePath = sPath;
|
|
@@ -110,6 +116,8 @@ var MxDbImage = /** @class */ (function (_super) {
|
|
|
110
116
|
var ret = [];
|
|
111
117
|
ret.push(this.pt1);
|
|
112
118
|
ret.push(this.pt2);
|
|
119
|
+
var midPt = new THREE.Vector3(this.pt1.x + (this.pt2.x - this.pt1.x) * 0.5, this.pt1.y + (this.pt2.y - this.pt1.y) * 0.5);
|
|
120
|
+
ret.push(midPt);
|
|
113
121
|
return ret;
|
|
114
122
|
};
|
|
115
123
|
// 图片的夹点拖动编辑.
|
|
@@ -117,7 +125,11 @@ var MxDbImage = /** @class */ (function (_super) {
|
|
|
117
125
|
if (index == 0) {
|
|
118
126
|
this.pt1.add(offset);
|
|
119
127
|
}
|
|
120
|
-
else if (
|
|
128
|
+
else if (index == 1) {
|
|
129
|
+
this.pt2.add(offset);
|
|
130
|
+
}
|
|
131
|
+
else if (index == 2) {
|
|
132
|
+
this.pt1.add(offset);
|
|
121
133
|
this.pt2.add(offset);
|
|
122
134
|
}
|
|
123
135
|
return true;
|
|
@@ -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
|
-
|
|
84
|
+
if (isAutoResize)
|
|
85
|
+
(0, useCanvasResizeListener_1.default)(mxdrawObj, canvas);
|
|
81
86
|
callback &&
|
|
82
87
|
callback(mxdrawObj, {
|
|
83
88
|
canvas: canvas,
|
|
@@ -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":
|
|
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)
|
|
@@ -6121,7 +6121,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6121
6121
|
} }
|
|
6122
6122
|
function d(t) { null != t && null != t.grips && null != t.ents && a.MxFun.getCurrentMx().getMxDatabase().getGripManager().gripEditImp(t); }
|
|
6123
6123
|
(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":
|
|
6124
|
+
}, { "./MxDrawData": 40, "./MxFun": 45, "./MxIntelliSelect": 46, "./MxJigCmdManager": 48, "./MxType": 60, "./MxWindowsEvent": 66 }], 40: [function (t, e, n) {
|
|
6125
6125
|
"use strict";
|
|
6126
6126
|
var i, r, a;
|
|
6127
6127
|
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); };
|
|
@@ -6489,32 +6489,32 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6489
6489
|
}, { "./MxDrawData": 40, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 45: [function (t, e, n) {
|
|
6490
6490
|
"use strict";
|
|
6491
6491
|
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
|
|
6494
|
-
function
|
|
6495
|
-
function B() { return y.MxManager.currentMx(); }
|
|
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"), k = t("./MxVersion");
|
|
6493
|
+
function N(t) { t.cmd && j(t.cmd); }
|
|
6494
|
+
function B(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
|
|
6496
6495
|
function F() { return y.MxManager.currentMx(); }
|
|
6497
|
-
function z(
|
|
6496
|
+
function z() { return y.MxManager.currentMx(); }
|
|
6497
|
+
function j(t, e) { var n = z(); if (n)
|
|
6498
6498
|
return C.MxCmdRunManager.runCmd(n, t, e); }
|
|
6499
|
-
function
|
|
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 =
|
|
6499
|
+
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); }
|
|
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 = 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
6501
|
for (var i = 0; i < e.length; i++) {
|
|
6502
6502
|
var r = e[i].replace(/[=|^==]/, "&").split("&");
|
|
6503
6503
|
if (1 < r.length) {
|
|
6504
6504
|
var a = new Array;
|
|
6505
6505
|
a.push(decodeURIComponent(r[0])), a.push(decodeURIComponent(r[1])), n.push(a);
|
|
6506
6506
|
}
|
|
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 =
|
|
6508
|
-
return 1 == a; var t =
|
|
6509
|
-
return 1 == l; var t =
|
|
6510
|
-
return 1 == o; var t =
|
|
6511
|
-
return r; var t =
|
|
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 = 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)
|
|
6508
|
+
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)
|
|
6509
|
+
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)
|
|
6510
|
+
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)
|
|
6511
|
+
return r; var t = B("file"); if (r = !1, null != t) {
|
|
6512
6512
|
var e = t.substring(t.lastIndexOf(".") + 1);
|
|
6513
6513
|
"dwg" != e.toLowerCase() && "dxf" != e.toLowerCase() && "dwf" != e.toLowerCase() && "mwg" != e.toLowerCase() || (r = !0);
|
|
6514
6514
|
} 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 =
|
|
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 = z, p.formatString = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
|
|
6516
6516
|
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 ||
|
|
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 || 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
6518
|
0 == e.length && (e = "empty");
|
|
6519
6519
|
var s = e.substring(e.lastIndexOf(".") + 1).toLowerCase();
|
|
6520
6520
|
if ("dwg" != s && "dxf" != s && "dwf" != s && "mwg" != s && "wgh" != s || (o = !0), 1 != a && null != a && "wgh" != s) {
|
|
@@ -6526,7 +6526,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6526
6526
|
}
|
|
6527
6527
|
}
|
|
6528
6528
|
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 =
|
|
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 = 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
6530
|
e[n - 1] = arguments[n]; if (!T.MxUiVue.isNull()) {
|
|
6531
6531
|
for (var i = arguments, r = i[0], a = 0; a < i.length - 1; a++) {
|
|
6532
6532
|
var o = new RegExp("\\{" + a + "\\}", "gm");
|
|
@@ -6534,7 +6534,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6534
6534
|
}
|
|
6535
6535
|
T.MxUiVue.AcutPrintfNoFormat(r, !0);
|
|
6536
6536
|
} }, 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, "./
|
|
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, "./MxVersion": 65, "./MxWindowsEvent": 66, "./TempTest/MxTestJig": 68, three: 19 }], 46: [function (t, e, n) {
|
|
6538
6538
|
"use strict";
|
|
6539
6539
|
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
6540
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
|
|
@@ -6602,7 +6602,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6602
6602
|
} 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
6603
|
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
6604
|
n.McEdJigCommand = h;
|
|
6605
|
-
}, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent":
|
|
6605
|
+
}, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 66, three: 19 }], 48: [function (t, e, n) {
|
|
6606
6606
|
"use strict";
|
|
6607
6607
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxJigCmdManager = n.AcquireReturn = void 0;
|
|
6608
6608
|
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 +6696,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6696
6696
|
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
6697
|
} }, r.GetAcqurePointFromStringTo = H, r.ProcCommandRetResult = J, r.GetCommandLineContent = q, r.acquirePoint = function (t) { var e = new st; if (null == w)
|
|
6698
6698
|
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":
|
|
6699
|
+
}, { "./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
6700
|
"use strict";
|
|
6701
6701
|
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
6702
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
|
|
@@ -7121,6 +7121,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7121
7121
|
} }, 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
7122
|
return !1; d.OnMxEvent(t); };
|
|
7123
7123
|
}, { "./MxCmdRunManager": 33, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59 }], 65: [function (t, e, n) {
|
|
7124
|
+
"use strict";
|
|
7125
|
+
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxBulid = void 0, window.MxDrawVersion = "1.0(2022-04-22 21:39)", (n.MxBulid || (n.MxBulid = {})).getVersion = function () { return window.MxDrawVersion ? window.MxDrawVersion : "inalid version"; };
|
|
7126
|
+
}, {}], 66: [function (t, e, n) {
|
|
7124
7127
|
"use strict";
|
|
7125
7128
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxWindowsEvent = void 0;
|
|
7126
7129
|
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 +7180,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7177
7180
|
else
|
|
7178
7181
|
u.MxJigCmdManager.isRunning() && u.MxJigCmdManager.stopCmd(); }
|
|
7179
7182
|
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 }],
|
|
7183
|
+
}, { "./MxDrawData": 40, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxUiVue": 64, three: 19 }], 67: [function (e, t, n) {
|
|
7181
7184
|
"use strict";
|
|
7182
7185
|
Object.defineProperty(n, "__esModule", { value: !0 });
|
|
7183
7186
|
var i = e("./MxFun");
|
|
@@ -7187,7 +7190,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7187
7190
|
var t = i.MxFun.getUiObject();
|
|
7188
7191
|
null != t && t.writeUICSS();
|
|
7189
7192
|
} "undefined" == typeof MxDocumentReady ? $(document).ready(function () { r.CreateMx(); }) : MxDocumentReady(e, r.CreateMx); }, r).Main();
|
|
7190
|
-
}, { "./MxFun": 45 }],
|
|
7193
|
+
}, { "./MxFun": 45 }], 68: [function (t, e, n) {
|
|
7191
7194
|
"use strict";
|
|
7192
7195
|
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
7196
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
|
|
@@ -7222,5 +7225,5 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7222
7225
|
}
|
|
7223
7226
|
return 0;
|
|
7224
7227
|
} }); };
|
|
7225
|
-
}, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [
|
|
7228
|
+
}, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [67]); }
|
|
7226
7229
|
exports.default = mxfun;
|
|
@@ -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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
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
|
}
|
package/dist/lib/doc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MxDbRect = exports.MxDbLine = exports.MxDbSVG = exports.MxDbImage = exports.MxDbEntity = exports.McGiWorldDrawType = exports.useCanvasResizeListener = exports.loadCoreCode = exports.MrxDbgUiPrBaseReturn = exports.McEdGetPointWorldDrawObject = exports.MrxDbgUiPrPoint = exports.MxDrawObject = exports.MxThreeJS = exports.MxFun = void 0;
|
|
3
|
+
exports.MxDbRect = exports.MxDbLine = exports.MxDbSVG = exports.MxDbImage = exports.MxFilters = exports.MxDbEntity = exports.McGiWorldDrawType = exports.useCanvasResizeListener = exports.loadCoreCode = exports.MrxDbgUiPrBaseReturn = exports.McEdGetPointWorldDrawObject = exports.MrxDbgUiPrPoint = exports.MxDrawObject = exports.MxThreeJS = exports.MxFun = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Mx 模块集
|
|
6
6
|
*
|
|
@@ -34,3 +34,5 @@ var MxDbLine_1 = require("./MxModule/MxDbLine/MxDbLine");
|
|
|
34
34
|
exports.MxDbLine = MxDbLine_1.default;
|
|
35
35
|
var MxDbRect_1 = require("./MxModule/MxDbRect/MxDbRect");
|
|
36
36
|
exports.MxDbRect = MxDbRect_1.default;
|
|
37
|
+
var MxFilters_1 = require("./MxModule/MxFilters/MxFilters");
|
|
38
|
+
exports.MxFilters = MxFilters_1.default;
|
package/dist/lib/mxdraw.js
CHANGED
|
@@ -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.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.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;
|
|
@@ -30,6 +30,8 @@ var MxDbRect_1 = require("./MxModule/MxDbRect");
|
|
|
30
30
|
exports.MxDbRect = MxDbRect_1.default;
|
|
31
31
|
var MxDbAlignedDimension_1 = require("./MxModule/MxDbAlignedDimension");
|
|
32
32
|
exports.MxDbAlignedDimension = MxDbAlignedDimension_1.default;
|
|
33
|
+
var MxFilters_1 = require("./MxModule/MxFilters");
|
|
34
|
+
exports.MxFilters = MxFilters_1.default;
|
|
33
35
|
var McGiWorldDrawType_1 = require("./MxModule/McGiWorldDrawType");
|
|
34
36
|
exports.McGiWorldDrawType = McGiWorldDrawType_1.default;
|
|
35
37
|
var MxType_1 = require("./MxModule/MxType");
|
|
@@ -44,6 +46,7 @@ exports.default = {
|
|
|
44
46
|
McEdGetPointWorldDrawObject: McEdGetPointWorldDrawObject_1.default,
|
|
45
47
|
MrxDbgUiPrPoint: MrxDbgUiPrPoint_1.default,
|
|
46
48
|
MxDbEntity: MxDbEntity_1.default,
|
|
49
|
+
MxFilters: MxFilters_1.default,
|
|
47
50
|
MxDbImage: MxDbImage_1.default,
|
|
48
51
|
MxDbLine: MxDbLine_1.default,
|
|
49
52
|
MxDbSVG: MxDbSVG_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(
|
|
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(
|
|
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(
|
|
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(
|
|
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*/];
|