mxdraw 0.1.10 → 0.1.13
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/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js +1 -128
- package/dist/lib/MxModule/McEdGetPointWorldDrawObject/index.js +1 -5
- package/dist/lib/MxModule/McGeVector3d/McGeVector3d.js +1 -2
- package/dist/lib/MxModule/McGeVector3d/index.js +1 -3
- package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js +1 -2
- package/dist/lib/MxModule/McGiWorldDraw/index.js +1 -2
- package/dist/lib/MxModule/McGiWorldDrawType/McGiWorldDrawType.js +1 -19
- package/dist/lib/MxModule/McGiWorldDrawType/index.js +1 -4
- package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.js +1 -31
- package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/index.js +1 -5
- package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +1 -150
- package/dist/lib/MxModule/MrxDbgUiPrPoint/index.js +1 -5
- package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +1 -213
- package/dist/lib/MxModule/MxDbAlignedDimension/index.js +1 -5
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -241
- package/dist/lib/MxModule/MxDbEntity/index.js +1 -5
- package/dist/lib/MxModule/MxDbImage/MxDbImage.js +1 -160
- package/dist/lib/MxModule/MxDbImage/index.js +1 -5
- package/dist/lib/MxModule/MxDbLine/MxDbLine.js +1 -94
- package/dist/lib/MxModule/MxDbLine/index.js +1 -5
- package/dist/lib/MxModule/MxDbRect/MxDbRect.js +1 -273
- package/dist/lib/MxModule/MxDbRect/index.js +1 -4
- package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +1 -340
- package/dist/lib/MxModule/MxDbSVG/index.js +1 -5
- package/dist/lib/MxModule/MxDbSVGText/MxDbSVGText.js +1 -21
- package/dist/lib/MxModule/MxDbSVGText/index.js +1 -5
- package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +1 -682
- package/dist/lib/MxModule/MxDrawObject/index.js +1 -5
- package/dist/lib/MxModule/MxFilters/MxFilters.js +1 -201
- package/dist/lib/MxModule/MxFilters/index.js +1 -4
- package/dist/lib/MxModule/MxFun/MxFun.js +1 -629
- package/dist/lib/MxModule/MxFun/index.js +1 -9
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +1 -279
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +1 -134
- package/dist/lib/MxModule/MxThreeJS/SVGLoader.js +1 -1862
- package/dist/lib/MxModule/MxThreeJS/index.js +1 -7
- package/dist/lib/MxModule/MxType/MxType.js +1 -27
- package/dist/lib/MxModule/MxType/index.js +1 -4
- package/dist/lib/MxModule/Mxassembly/Mxassembly.js +1 -18
- package/dist/lib/MxModule/Mxassembly/index.js +1 -9
- package/dist/lib/MxModule/loadCoreCode/index.js +1 -5
- package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +1 -126
- package/dist/lib/MxModule/loadCoreCode/mxUiData.js +1 -0
- package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1 -1519
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -7242
- package/dist/lib/MxModule/store/PubsubClass.js +1 -40
- package/dist/lib/MxModule/store/StoreClass.js +1 -73
- package/dist/lib/MxModule/store/index.js +1 -16
- package/dist/lib/MxModule/store/store.js +1 -25
- package/dist/lib/MxModule/useCanvasResizeListener/index.js +1 -5
- package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +1 -95
- package/dist/lib/doc.js +1 -38
- package/dist/lib/mxdraw.js +1 -64
- package/dist/lib/tools/algorithm/math.js +1 -16
- package/dist/lib/tools/algorithm/random.js +1 -13
- package/dist/lib/tools/dom/create.js +1 -47
- package/dist/lib/tools/dynamicImport/index.js +1 -142
- package/dist/lib/tools/formatting/index.js +1 -20
- package/dist/lib/tools/proxy/index.js +1 -17
- package/dist/lib/tools/three/index.js +1 -124
- package/dist/lib/types/McEdGetPointWorldDrawObject.js +1 -2
- package/dist/lib/types/MrxDbgUiPrPoint.js +1 -2
- package/dist/lib/types/MxCADObject.js +1 -2
- package/dist/lib/types/MxDrawObject.js +1 -2
- package/dist/lib/types/MxFun.js +1 -2
- package/dist/lib/types/Mxassembly.js +1 -2
- package/dist/mxdraw.es5.js +1 -45
- package/dist/mxdraw.umd.js +1 -45
- package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +4 -0
- package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +12 -1
- package/dist/types/MxModule/MxFun/MxFun.d.ts +19 -2
- package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +1 -1
- package/dist/types/MxModule/loadCoreCode/mxUiData.d.ts +111 -0
- package/dist/types/MxModule/store/index.d.ts +2 -7
- package/dist/types/mxdraw.d.ts +1 -4
- package/dist/types/tools/dynamicImport/index.d.ts +1 -0
- package/dist/types/types/MxDrawObject.d.ts +2 -1
- package/dist/types/types/MxFun.d.ts +2 -1
- package/package.json +6 -5
- package/dist/mxdraw.es5.js.map +0 -1
- package/dist/mxdraw.umd.js.map +0 -1
|
@@ -1,7 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var MxThreeJS_mixin_1 = require("./MxThreeJS.mixin");
|
|
4
|
-
var MxThreeJS_1 = require("./MxThreeJS");
|
|
5
|
-
var MxThreeJS = new MxThreeJS_1.default();
|
|
6
|
-
(0, MxThreeJS_mixin_1.default)(MxThreeJS);
|
|
7
|
-
exports.default = MxThreeJS;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxThreeJS_mixin_1=require("./MxThreeJS.mixin"),MxThreeJS_1=require("./MxThreeJS"),MxThreeJS=new MxThreeJS_1.default;(0,MxThreeJS_mixin_1.default)(MxThreeJS),exports.default=MxThreeJS;
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @module MxType*/
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* 动态绘制类型
|
|
6
|
-
* @example ```typescript
|
|
7
|
-
|
|
8
|
-
* ```
|
|
9
|
-
*/
|
|
10
|
-
var MxCloneType;
|
|
11
|
-
(function (MxCloneType) {
|
|
12
|
-
/** 正常Clone */
|
|
13
|
-
MxCloneType[MxCloneType["kClone"] = 1] = "kClone";
|
|
14
|
-
/** 动态拖动Clone */
|
|
15
|
-
MxCloneType[MxCloneType["kDragClone"] = 2] = "kDragClone";
|
|
16
|
-
})(MxCloneType || (MxCloneType = {}));
|
|
17
|
-
var MxCloneType2;
|
|
18
|
-
(function (MxCloneType2) {
|
|
19
|
-
/** 正常Clone */
|
|
20
|
-
MxCloneType2[MxCloneType2["kClone"] = 1] = "kClone";
|
|
21
|
-
/** 动态拖动Clone */
|
|
22
|
-
MxCloneType2[MxCloneType2["kDragClone"] = 2] = "kDragClone";
|
|
23
|
-
})(MxCloneType2 || (MxCloneType2 = {}));
|
|
24
|
-
exports.default = {
|
|
25
|
-
MxCloneType: MxCloneType,
|
|
26
|
-
MxCloneType2: MxCloneType2
|
|
27
|
-
};
|
|
1
|
+
"use strict";var MxCloneType,MxCloneType2;Object.defineProperty(exports,"__esModule",{value:!0}),function(e){e[e.kClone=1]="kClone",e[e.kDragClone=2]="kDragClone"}(MxCloneType||(MxCloneType={})),function(e){e[e.kClone=1]="kClone",e[e.kDragClone=2]="kDragClone"}(MxCloneType2||(MxCloneType2={})),exports.default={MxCloneType:MxCloneType,MxCloneType2:MxCloneType2};
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var MxType_1 = require("./MxType");
|
|
4
|
-
exports.default = MxType_1.default;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxType_1=require("./MxType");exports.default=MxType_1.default;
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var store_1 = require("../store/store");
|
|
4
|
-
/**
|
|
5
|
-
* Mxassembly 模块
|
|
6
|
-
* 导出库时已实例化,只需要调用实例方法 例如:
|
|
7
|
-
* ```typescript
|
|
8
|
-
* ```
|
|
9
|
-
*/
|
|
10
|
-
var Mxassembly = /** @class */ (function () {
|
|
11
|
-
function Mxassembly() {
|
|
12
|
-
}
|
|
13
|
-
Mxassembly.prototype.NewMcGeVector3d = function () {
|
|
14
|
-
return new store_1.default.state.Mxassembly.McGeVector3d();
|
|
15
|
-
};
|
|
16
|
-
return Mxassembly;
|
|
17
|
-
}());
|
|
18
|
-
exports.default = Mxassembly;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var store_1=require("../store/store"),Mxassembly=function(){function e(){}return e.prototype.NewMcGeVector3d=function(){return new store_1.default.state.Mxassembly.McGeVector3d},e}();exports.default=Mxassembly;
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var Mxassembly_1 = require("./Mxassembly");
|
|
4
|
-
// import store from '../store/_index'
|
|
5
|
-
// import loadCoreCode from '../loadCoreCode'
|
|
6
|
-
// if (!store.state.MxFUn) {
|
|
7
|
-
// loadCoreCode()
|
|
8
|
-
// }
|
|
9
|
-
exports.default = new Mxassembly_1.default();
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Mxassembly_1=require("./Mxassembly");exports.default=new Mxassembly_1.default;
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/** @module loadCoreCode */
|
|
4
|
-
var loadCoreCode_1 = require("./loadCoreCode");
|
|
5
|
-
exports.default = loadCoreCode_1.default;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var loadCoreCode_1=require("./loadCoreCode");exports.default=loadCoreCode_1.default;
|
|
@@ -1,126 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
/** @module loadCoreCode */
|
|
40
|
-
var dynamicImport_1 = require("../../tools/dynamicImport");
|
|
41
|
-
var store_1 = require("../store/store");
|
|
42
|
-
var mxfun_es5_js_1 = require("./mxfun.es5.js");
|
|
43
|
-
var mxcadassembly_es5_js_1 = require("./mxcadassembly_es5.js");
|
|
44
|
-
var MxDbImage_1 = require("../MxDbImage");
|
|
45
|
-
var MxDbSVG_1 = require("../MxDbSVG");
|
|
46
|
-
var MxDbAlignedDimension_1 = require("../MxDbAlignedDimension");
|
|
47
|
-
var MxDbLine_1 = require("../MxDbLine");
|
|
48
|
-
var MxDbRect_1 = require("../MxDbRect");
|
|
49
|
-
function rxInitMxEntity() {
|
|
50
|
-
new MxDbImage_1.default().rxInit();
|
|
51
|
-
new MxDbSVG_1.default().rxInit();
|
|
52
|
-
new MxDbAlignedDimension_1.default().rxInit();
|
|
53
|
-
new MxDbLine_1.default().rxInit();
|
|
54
|
-
new MxDbRect_1.default().rxInit();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 加载MxDraw库的核心代码 才能使用Mx的其他模块
|
|
58
|
-
* @returns Promise<{@link MxFun}>
|
|
59
|
-
* @example
|
|
60
|
-
* ```
|
|
61
|
-
* Mx.loadCoreCode().then(()=> console.log("加载完成", Mx.MxFun))
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
function loadCoreCode() {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
-
var _this = this;
|
|
67
|
-
return __generator(this, function (_a) {
|
|
68
|
-
return [2 /*return*/, new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
69
|
-
var _a, _b, e_1;
|
|
70
|
-
return __generator(this, function (_c) {
|
|
71
|
-
switch (_c.label) {
|
|
72
|
-
case 0:
|
|
73
|
-
_c.trys.push([0, 2, , 3]);
|
|
74
|
-
if (store_1.default.state.MxFun) {
|
|
75
|
-
console.error('内部已调用loadCoreCode, 无需重复调用!');
|
|
76
|
-
return [2 /*return*/, rej({
|
|
77
|
-
code: 'error',
|
|
78
|
-
msg: '内部已调用loadCoreCode, 无需重复调用'
|
|
79
|
-
})];
|
|
80
|
-
}
|
|
81
|
-
_a = window;
|
|
82
|
-
_b = window;
|
|
83
|
-
return [4 /*yield*/, (0, dynamicImport_1.dynamicImport)('jquery')];
|
|
84
|
-
case 1:
|
|
85
|
-
_a.$ = _b.jQuery = _c.sent();
|
|
86
|
-
window.MxDocumentReady = undefined;
|
|
87
|
-
window.MxUiMain = function (requireFun) {
|
|
88
|
-
var MxFun = requireFun('./MxFun').MxFun;
|
|
89
|
-
store_1.default.commit('setMxFun', MxFun);
|
|
90
|
-
store_1.default.events.emit('MxUiMain', requireFun);
|
|
91
|
-
window.MxUiMain = undefined;
|
|
92
|
-
};
|
|
93
|
-
// 与MxMain有冲突(执行顺序有问题)
|
|
94
|
-
// window.MxDocumentReady = (requireFun: (path: string) => RequireFunReturnObjectType, mxinit: () => void) => {
|
|
95
|
-
// store.events.emit("MxDocumentReady", requireFun, mxinit)
|
|
96
|
-
// mxinit()
|
|
97
|
-
// }
|
|
98
|
-
window.MxMain = function (requireFun) {
|
|
99
|
-
store_1.default.events.emit('MxMain', requireFun);
|
|
100
|
-
window.MxMain = undefined;
|
|
101
|
-
rxInitMxEntity();
|
|
102
|
-
res();
|
|
103
|
-
return 0;
|
|
104
|
-
};
|
|
105
|
-
(0, mxcadassembly_es5_js_1.default)().then(function (mxassembly) {
|
|
106
|
-
//console.log(mxassembly);
|
|
107
|
-
store_1.default.commit('setMxassembly', mxassembly);
|
|
108
|
-
});
|
|
109
|
-
// 加载mxfun.min.js,mxfun()相当直接模拟了mxfun.min.js的加载。
|
|
110
|
-
(0, mxfun_es5_js_1.default)();
|
|
111
|
-
return [3 /*break*/, 3];
|
|
112
|
-
case 2:
|
|
113
|
-
e_1 = _c.sent();
|
|
114
|
-
rej({
|
|
115
|
-
code: 'error',
|
|
116
|
-
msg: e_1
|
|
117
|
-
});
|
|
118
|
-
return [3 /*break*/, 3];
|
|
119
|
-
case 3: return [2 /*return*/];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}); })];
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
exports.default = loadCoreCode;
|
|
1
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var dynamicImport_1=require("../../tools/dynamicImport"),store_1=require("../store/store"),mxfun_es5_js_1=require("./mxfun.es5.js"),mxcadassembly_es5_js_1=require("./mxcadassembly_es5.js");function rxInitMxEntity(){store_1.default.state.MxFun.initDynamicCreate(dynamicImport_1.dynamicCreateMxObject)}function loadCoreCode(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(t){return[2,new Promise(function(t,n){return __awaiter(e,void 0,void 0,function(){var e,r,o;return __generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),store_1.default.state.MxFun?(console.error("内部已调用loadCoreCode, 无需重复调用!"),[2,n({code:"error",msg:"内部已调用loadCoreCode, 无需重复调用"})]):(e=window,r=window,[4,(0,dynamicImport_1.dynamicImport)("jquery")]);case 1:return e.$=r.jQuery=i.sent(),window.MxDocumentReady=void 0,window.MxUiMain=function(e){var t=e("./MxFun").MxFun;store_1.default.commit("setMxFun",t),store_1.default.events.emit("MxUiMain",e),window.MxUiMain=void 0},window.MxMain=function(e){return store_1.default.events.emit("MxMain",e),window.MxMain=void 0,rxInitMxEntity(),t(),0},(0,mxcadassembly_es5_js_1.default)().then(function(e){store_1.default.commit("setMxassembly",e)}),(0,mxfun_es5_js_1.default)(),[3,3];case 2:return o=i.sent(),n({code:"error",msg:o}),[3,3];case 3:return[2]}})})})]})})}exports.default=loadCoreCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MxVueInterface=void 0;var MxVueComandLine=function(){function t(){var t=this;this.msCmdText="",this.msCmdDisplay="",this.msCmdTip="",this.mUpDisplayFun=void 0,this.mxFunObject=void 0,this.mountUpDisplayFun=function(n){t.mUpDisplayFun=n},this.setCmdText=function(n){t.msCmdText=n},this.getCmdText=function(){return t.msCmdText},this.getCmdDisplay=function(){return t.msCmdDisplay},this.setCmdDisplay=function(n){t.msCmdDisplay=n},this.addCmdDisplay=function(n){t.msCmdDisplay.length>1024?(t.msCmdDisplay=t.msCmdDisplay.substring(t.msCmdDisplay.length-1024,t.msCmdDisplay.length),t.msCmdDisplay=t.msCmdDisplay+n):t.msCmdDisplay=t.msCmdDisplay+n},this.setCmdTip=function(n){t.msCmdTip=n},this.getCmdTip=function(){return t.msCmdTip}}return t.prototype.upDisplay=function(){var t=this.msCmdTip,n=this.msCmdDisplay,e=this.msCmdText;void 0!=this.mUpDisplayFun&&this.mUpDisplayFun({msCmdTip:t,msCmdDisplay:n,msCmdText:e})},t}(),MxInputType={kNoInput:0,kXYCoordInput:1,kDistanceInput:2,kDynTip:3},MxInputPostionType={kRelative:0,kAbsolutely:1},MxDynamicInput=function(){return function(){var t=this;this.mType=MxInputType.kNoInput,this.mPos=[0,0],this.mTip="",this.mValue1="",this.mValue1Pos=[0,0],this.mValue2="",this.mValue2Pos=[0,0],this.misShow=!1,this.mOnKeydownEvent=void 0,this.mFocusValue="",this.setFocusValue=function(n){t.mFocusValue=n},this.getFocusValue=function(){return t.mFocusValue},this.mountKeydownEvent=function(n){t.mOnKeydownEvent=n},this.onKeydown=function(n){void 0!=t.mOnKeydownEvent&&t.mOnKeydownEvent(n)},this.setType=function(n){t.mType=n},this.getType=function(){return t.mType},this.isShow=function(){return t.misShow},this.setPos=function(n){t.mPos=n},this.setTip=function(n){t.mTip=n},this.setValue1=function(n){t.mValue1=n},this.getValue1=function(){return t.mValue1},this.setValue1Pos=function(n){t.mValue1Pos=n},this.setValue2=function(n){t.mValue2=n},this.getValue2=function(){return t.mValue2},this.setValue2Pos=function(n){t.mValue2Pos=n},this.setShow=function(n){t.misShow=n},this.getData=function(){if(t.misShow){var n={list:[{value:"",readonly:!0},{value:"",readonly:!1},{value:"",readonly:!1}],pos:t.mPos,postype:MxInputPostionType.kRelative};if(t.mType!=MxInputType.kNoInput)return t.mType==MxInputType.kXYCoordInput?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!0,n.list[1].value=t.mValue1,n.list[1].readonly=!1,n.list[2].show=!0,n.list[2].value=t.mValue2,n.list[2].readonly=!1):t.mType==MxInputType.kDistanceInput?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!0,n.list[1].value=t.mValue1,n.list[1].readonly=!1,n.list[1].pos=t.mValue1Pos,n.list[2].show=!0,n.list[2].value=t.mValue2,n.list[2].readonly=!0,n.list[2].pos=t.mValue2Pos,n.postype=MxInputPostionType.kAbsolutely):t.mType==MxInputType.kDynTip?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!1,n.list[2].show=!1):n=void 0,n}}}}(),CursorType={kNormal:"cursor3",kRect:"cursor1",kCross:"cursor2"},MxVueInterface=function(){return function(){var t=this;this.mSetCoordFun=void 0,this.mUpdateCursorFun=void 0,this.mOnKeydownEvent=void 0,this.mCursorType=CursorType.kNormal,this.mComandLine=new MxVueComandLine,this.mdynamicInput=new MxDynamicInput,this.mMxEvents={},this.mountSetCoordFun=function(n){t.mSetCoordFun=n},this.mountUpdateCursorFun=function(n){t.mUpdateCursorFun=n},this.mountKeydownEvent=function(n){t.mOnKeydownEvent=n},this.onKeydown=function(n){void 0!=t.mOnKeydownEvent&&t.mOnKeydownEvent(n)},this.setTipCoord=function(n){void 0!=t.mSetCoordFun&&t.mSetCoordFun(n)},this.getCursorType=function(){return t.mCursorType},this.setCursorType=function(n){if("number"==typeof n)switch(n){case 0:t.mCursorType=CursorType.kNormal;break;case 1:t.mCursorType=CursorType.kRect;break;case 2:t.mCursorType=CursorType.kCross}else t.mCursorType=n;void 0!=t.mUpdateCursorFun&&t.mUpdateCursorFun()},this.getTitle=function(){return t.mTitle},this.getTopButtonBarData=function(){return t.mTopButtonBarData},this.getMenuBarData=function(){return t.mMenuBarData},this.getRighButtonBarData=function(){return t.mRighButtonBarData},this.getLeftButtonBarData=function(){return t.mLeftButtonBarData},this.getTitleButtonBarData=function(){return t.mTitleButtonBarData},this.getLayerComboxData=function(){return t.mLayerComboxData},this.getColorComboxData=function(){return t.mColorComboxData},this.getLinetypeComboxData=function(){return t.mLinetypeComboxData},this.getFooterData=function(){return t.mFooterData},this.sendStringToExecute=function(n){t.mxFunObject.sendStringToExecute(n)},this.getCmdLine=function(){return t.mComandLine},this.getDynamicInput=function(){return t.mdynamicInput},this.init=function(n){t.mxFunObject=n},this.OnMxEvent=function(n){var e=n.name;if(void 0!=e){var i=t.mMxEvents[e];void 0!=i&&i(n.param)}},this.mountMxEvent=function(n,e){t.mMxEvents[n]=e}}}();exports.MxVueInterface=MxVueInterface,exports.default=new MxVueInterface;
|