mxdraw 0.1.21 → 0.1.25
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/McGePoint3d/McGePoint3d.js +1 -0
- package/dist/lib/MxModule/McGePoint3d/index.js +1 -0
- package/dist/lib/MxModule/McGePoint3dArray/McGePoint3dArray.js +1 -0
- package/dist/lib/MxModule/McGePoint3dArray/index.js +1 -0
- package/dist/lib/MxModule/McGeTool/McGeTool.js +1 -0
- package/dist/lib/MxModule/McGeTool/index.js +1 -0
- package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js +1 -3
- 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 -159
- package/dist/lib/MxModule/MrxDbgUiPrPoint/index.js +1 -5
- package/dist/lib/MxModule/Mx3PointArc/Mx3PointArc.js +1 -0
- package/dist/lib/MxModule/Mx3PointArc/index.js +1 -0
- package/dist/lib/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.js +1 -0
- package/dist/lib/MxModule/MxDb2LineAngularDimension/index.js +1 -0
- package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +1 -213
- package/dist/lib/MxModule/MxDbAlignedDimension/index.js +1 -5
- package/dist/lib/MxModule/MxDbAnyLine/MxDbAnyLine.js +1 -0
- package/dist/lib/MxModule/MxDbAnyLine/index.js +1 -0
- package/dist/lib/MxModule/MxDbArea/MxDbArea.js +1 -0
- package/dist/lib/MxModule/MxDbArea/index.js +1 -0
- package/dist/lib/MxModule/MxDbCoord/MxDbCoord.js +1 -0
- package/dist/lib/MxModule/MxDbCoord/index.js +1 -0
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -258
- 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/MxDbPolyline/MxDbPolyline.js +1 -97
- package/dist/lib/MxModule/MxDbPolyline/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 -419
- 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 -782
- 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 -676
- package/dist/lib/MxModule/MxFun/index.js +1 -4
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +1 -283
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +1 -146
- 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 -20
- 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 -125
- package/dist/lib/MxModule/loadCoreCode/mxUiData.js +1 -312
- package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1 -1519
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -7363
- 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 -19
- 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 -67
- 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 -243
- 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/mxdraw.es5.js +1 -0
- package/dist/mxdraw.umd.js +1 -0
- package/dist/types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts +9 -0
- package/dist/types/MxModule/McGePoint3d/McGePoint3d.d.ts +11 -0
- package/dist/types/MxModule/McGePoint3d/index.d.ts +3 -0
- package/dist/types/MxModule/McGePoint3dArray/McGePoint3dArray.d.ts +14 -0
- package/dist/types/MxModule/McGePoint3dArray/index.d.ts +3 -0
- package/dist/types/MxModule/McGeTool/McGeTool.d.ts +38 -0
- package/dist/types/MxModule/McGeTool/index.d.ts +4 -0
- package/dist/types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts +18 -1
- package/dist/types/MxModule/Mx3PointArc/Mx3PointArc.d.ts +19 -0
- package/dist/types/MxModule/Mx3PointArc/index.d.ts +3 -0
- package/dist/types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts +22 -0
- package/dist/types/MxModule/MxDb2LineAngularDimension/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts +18 -0
- package/dist/types/MxModule/MxDbAnyLine/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbArea/MxDbArea.d.ts +17 -0
- package/dist/types/MxModule/MxDbArea/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbCoord/MxDbCoord.d.ts +19 -0
- package/dist/types/MxModule/MxDbCoord/index.d.ts +3 -0
- package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +70 -1
- package/dist/types/MxModule/MxFun/MxFun.d.ts +95 -30
- package/dist/types/MxModule/Mxassembly/Mxassembly.d.ts +11 -2
- package/dist/types/MxModule/store/store.d.ts +2 -2
- package/dist/types/mxdraw.d.ts +17 -4
- package/dist/types/tools/three/index.d.ts +28 -1
- package/package.json +3 -2
- package/dist/lib/MxModule/McGeVector3d/McGeVector3d.js +0 -2
- package/dist/lib/MxModule/McGeVector3d/index.js +0 -3
- package/dist/lib/MxModule/MxThreeJS/SVGLoader.js +0 -1862
- package/dist/lib/types/McEdGetPointWorldDrawObject.js +0 -2
- package/dist/lib/types/MrxDbgUiPrPoint.js +0 -2
- package/dist/lib/types/MxCADObject.js +0 -2
- package/dist/lib/types/MxDrawObject.js +0 -2
- package/dist/lib/types/MxFun.js +0 -2
- package/dist/lib/types/Mxassembly.js +0 -2
- package/dist/types/MxModule/McGeVector3d/McGeVector3d.d.ts +0 -17
- package/dist/types/MxModule/McGeVector3d/index.d.ts +0 -3
- package/dist/types/MxModule/MxThreeJS/SVGLoader.d.ts +0 -22
- package/dist/types/types/McEdGetPointWorldDrawObject.d.ts +0 -9
- package/dist/types/types/MrxDbgUiPrPoint.d.ts +0 -23
- package/dist/types/types/MxCADObject.d.ts +0 -40
- package/dist/types/types/MxDrawObject.d.ts +0 -60
- package/dist/types/types/MxFun.d.ts +0 -47
- package/dist/types/types/Mxassembly.d.ts +0 -3
|
@@ -1,312 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MxVueInterface = void 0;
|
|
4
|
-
var MxVueComandLine = /** @class */ (function () {
|
|
5
|
-
function MxVueComandLine() {
|
|
6
|
-
var _this = this;
|
|
7
|
-
// 命令行
|
|
8
|
-
this.msCmdText = '';
|
|
9
|
-
this.msCmdDisplay = '';
|
|
10
|
-
this.msCmdTip = '';
|
|
11
|
-
this.mUpDisplayFun = undefined;
|
|
12
|
-
this.mxFunObject = undefined;
|
|
13
|
-
// 命令行更新
|
|
14
|
-
this.mountUpDisplayFun = function (fun) {
|
|
15
|
-
_this.mUpDisplayFun = fun;
|
|
16
|
-
};
|
|
17
|
-
this.setCmdText = function (str) {
|
|
18
|
-
_this.msCmdText = str;
|
|
19
|
-
};
|
|
20
|
-
this.getCmdText = function () {
|
|
21
|
-
return _this.msCmdText;
|
|
22
|
-
};
|
|
23
|
-
this.getCmdDisplay = function () {
|
|
24
|
-
return _this.msCmdDisplay;
|
|
25
|
-
};
|
|
26
|
-
this.setCmdDisplay = function (str) {
|
|
27
|
-
_this.msCmdDisplay = str;
|
|
28
|
-
};
|
|
29
|
-
this.addCmdDisplay = function (str) {
|
|
30
|
-
if (_this.msCmdDisplay.length > 1024) {
|
|
31
|
-
_this.msCmdDisplay = _this.msCmdDisplay.substring(_this.msCmdDisplay.length - 1024, _this.msCmdDisplay.length);
|
|
32
|
-
_this.msCmdDisplay = _this.msCmdDisplay + str;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
_this.msCmdDisplay = _this.msCmdDisplay + str;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
this.setCmdTip = function (str) {
|
|
39
|
-
_this.msCmdTip = str;
|
|
40
|
-
};
|
|
41
|
-
this.getCmdTip = function () {
|
|
42
|
-
return _this.msCmdTip;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
MxVueComandLine.prototype.upDisplay = function () {
|
|
46
|
-
var _a = this, msCmdTip = _a.msCmdTip, msCmdDisplay = _a.msCmdDisplay, msCmdText = _a.msCmdText;
|
|
47
|
-
if (this.mUpDisplayFun == undefined) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
this.mUpDisplayFun({
|
|
51
|
-
msCmdTip: msCmdTip,
|
|
52
|
-
msCmdDisplay: msCmdDisplay,
|
|
53
|
-
msCmdText: msCmdText
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
return MxVueComandLine;
|
|
57
|
-
}());
|
|
58
|
-
var MxInputType = {
|
|
59
|
-
kNoInput: 0,
|
|
60
|
-
kXYCoordInput: 1,
|
|
61
|
-
kDistanceInput: 2,
|
|
62
|
-
kDynTip: 3
|
|
63
|
-
};
|
|
64
|
-
var MxInputPostionType = {
|
|
65
|
-
kRelative: 0,
|
|
66
|
-
kAbsolutely: 1 // 绝对位置,指定位置。
|
|
67
|
-
};
|
|
68
|
-
var MxDynamicInput = /** @class */ (function () {
|
|
69
|
-
function MxDynamicInput() {
|
|
70
|
-
var _this = this;
|
|
71
|
-
this.mType = MxInputType.kNoInput;
|
|
72
|
-
this.mPos = [0, 0];
|
|
73
|
-
this.mTip = '';
|
|
74
|
-
this.mValue1 = '';
|
|
75
|
-
this.mValue1Pos = [0, 0];
|
|
76
|
-
this.mValue2 = '';
|
|
77
|
-
this.mValue2Pos = [0, 0];
|
|
78
|
-
this.misShow = false;
|
|
79
|
-
this.mOnKeydownEvent = undefined;
|
|
80
|
-
this.mFocusValue = '';
|
|
81
|
-
this.setFocusValue = function (value) {
|
|
82
|
-
_this.mFocusValue = value;
|
|
83
|
-
};
|
|
84
|
-
this.getFocusValue = function () {
|
|
85
|
-
return _this.mFocusValue;
|
|
86
|
-
};
|
|
87
|
-
this.mountKeydownEvent = function (fun) {
|
|
88
|
-
_this.mOnKeydownEvent = fun;
|
|
89
|
-
};
|
|
90
|
-
this.onKeydown = function (keyCode) {
|
|
91
|
-
if (_this.mOnKeydownEvent == undefined) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
_this.mOnKeydownEvent(keyCode);
|
|
95
|
-
};
|
|
96
|
-
this.setType = function (type) {
|
|
97
|
-
_this.mType = type;
|
|
98
|
-
};
|
|
99
|
-
this.getType = function () {
|
|
100
|
-
return _this.mType;
|
|
101
|
-
};
|
|
102
|
-
this.isShow = function () {
|
|
103
|
-
return _this.misShow;
|
|
104
|
-
};
|
|
105
|
-
this.setPos = function (pos) {
|
|
106
|
-
_this.mPos = pos;
|
|
107
|
-
};
|
|
108
|
-
this.setTip = function (tip) {
|
|
109
|
-
_this.mTip = tip;
|
|
110
|
-
};
|
|
111
|
-
this.setValue1 = function (val) {
|
|
112
|
-
_this.mValue1 = val;
|
|
113
|
-
};
|
|
114
|
-
this.getValue1 = function () {
|
|
115
|
-
return _this.mValue1;
|
|
116
|
-
};
|
|
117
|
-
this.setValue1Pos = function (pos) {
|
|
118
|
-
_this.mValue1Pos = pos;
|
|
119
|
-
};
|
|
120
|
-
this.setValue2 = function (val) {
|
|
121
|
-
_this.mValue2 = val;
|
|
122
|
-
};
|
|
123
|
-
this.getValue2 = function () {
|
|
124
|
-
return _this.mValue2;
|
|
125
|
-
};
|
|
126
|
-
this.setValue2Pos = function (pos) {
|
|
127
|
-
_this.mValue2Pos = pos;
|
|
128
|
-
};
|
|
129
|
-
this.setShow = function (isShow) {
|
|
130
|
-
_this.misShow = isShow;
|
|
131
|
-
};
|
|
132
|
-
this.getData = function () {
|
|
133
|
-
if (!_this.misShow) {
|
|
134
|
-
return undefined;
|
|
135
|
-
}
|
|
136
|
-
var ret = {
|
|
137
|
-
list: [
|
|
138
|
-
{ value: '', readonly: true },
|
|
139
|
-
{ value: '', readonly: false },
|
|
140
|
-
{ value: '', readonly: false }
|
|
141
|
-
],
|
|
142
|
-
pos: _this.mPos,
|
|
143
|
-
postype: MxInputPostionType.kRelative
|
|
144
|
-
};
|
|
145
|
-
if (_this.mType == MxInputType.kNoInput) {
|
|
146
|
-
return undefined;
|
|
147
|
-
}
|
|
148
|
-
else if (_this.mType == MxInputType.kXYCoordInput) {
|
|
149
|
-
ret.list[0].show = true;
|
|
150
|
-
ret.list[0].value = _this.mTip;
|
|
151
|
-
ret.list[0].readonly = true;
|
|
152
|
-
ret.list[1].show = true;
|
|
153
|
-
ret.list[1].value = _this.mValue1;
|
|
154
|
-
ret.list[1].readonly = false;
|
|
155
|
-
ret.list[2].show = true;
|
|
156
|
-
ret.list[2].value = _this.mValue2;
|
|
157
|
-
ret.list[2].readonly = false;
|
|
158
|
-
}
|
|
159
|
-
else if (_this.mType == MxInputType.kDistanceInput) {
|
|
160
|
-
ret.list[0].show = true;
|
|
161
|
-
ret.list[0].value = _this.mTip;
|
|
162
|
-
ret.list[0].readonly = true;
|
|
163
|
-
ret.list[1].show = true;
|
|
164
|
-
ret.list[1].value = _this.mValue1;
|
|
165
|
-
ret.list[1].readonly = false;
|
|
166
|
-
ret.list[1].pos = _this.mValue1Pos;
|
|
167
|
-
ret.list[2].show = true;
|
|
168
|
-
ret.list[2].value = _this.mValue2;
|
|
169
|
-
ret.list[2].readonly = true;
|
|
170
|
-
ret.list[2].pos = _this.mValue2Pos;
|
|
171
|
-
ret.postype = MxInputPostionType.kAbsolutely;
|
|
172
|
-
}
|
|
173
|
-
else if (_this.mType == MxInputType.kDynTip) {
|
|
174
|
-
ret.list[0].show = true;
|
|
175
|
-
ret.list[0].value = _this.mTip;
|
|
176
|
-
ret.list[0].readonly = true;
|
|
177
|
-
ret.list[1].show = false;
|
|
178
|
-
ret.list[2].show = false;
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
ret = undefined;
|
|
182
|
-
}
|
|
183
|
-
return ret;
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
return MxDynamicInput;
|
|
187
|
-
}());
|
|
188
|
-
var CursorType = {
|
|
189
|
-
kNormal: 'cursor3',
|
|
190
|
-
kRect: 'cursor1',
|
|
191
|
-
kCross: 'cursor2'
|
|
192
|
-
};
|
|
193
|
-
var MxVueInterface = /** @class */ (function () {
|
|
194
|
-
function MxVueInterface() {
|
|
195
|
-
var _this = this;
|
|
196
|
-
this.mSetCoordFun = undefined;
|
|
197
|
-
this.mUpdateCursorFun = undefined;
|
|
198
|
-
this.mOnKeydownEvent = undefined;
|
|
199
|
-
this.mCursorType = CursorType.kNormal;
|
|
200
|
-
this.mComandLine = new MxVueComandLine();
|
|
201
|
-
this.mdynamicInput = new MxDynamicInput();
|
|
202
|
-
this.mMxEvents = {};
|
|
203
|
-
this.mountSetCoordFun = function (fun) {
|
|
204
|
-
_this.mSetCoordFun = fun;
|
|
205
|
-
};
|
|
206
|
-
this.mountUpdateCursorFun = function (fun) {
|
|
207
|
-
_this.mUpdateCursorFun = fun;
|
|
208
|
-
};
|
|
209
|
-
this.mountKeydownEvent = function (fun) {
|
|
210
|
-
_this.mOnKeydownEvent = fun;
|
|
211
|
-
};
|
|
212
|
-
this.onKeydown = function (keyCode) {
|
|
213
|
-
if (_this.mOnKeydownEvent == undefined) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
_this.mOnKeydownEvent(keyCode);
|
|
217
|
-
};
|
|
218
|
-
this.setTipCoord = function (str) {
|
|
219
|
-
if (_this.mSetCoordFun == undefined) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
_this.mSetCoordFun(str);
|
|
223
|
-
};
|
|
224
|
-
this.getCursorType = function () {
|
|
225
|
-
return _this.mCursorType;
|
|
226
|
-
};
|
|
227
|
-
this.setCursorType = function (curtype) {
|
|
228
|
-
if (typeof curtype == 'number') {
|
|
229
|
-
switch (curtype) {
|
|
230
|
-
case 0: {
|
|
231
|
-
_this.mCursorType = CursorType.kNormal;
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
case 1: {
|
|
235
|
-
_this.mCursorType = CursorType.kRect;
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
case 2: {
|
|
239
|
-
_this.mCursorType = CursorType.kCross;
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
_this.mCursorType = curtype;
|
|
246
|
-
}
|
|
247
|
-
if (_this.mUpdateCursorFun == undefined) {
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
_this.mUpdateCursorFun();
|
|
251
|
-
};
|
|
252
|
-
this.getTitle = function () {
|
|
253
|
-
return _this.mTitle;
|
|
254
|
-
};
|
|
255
|
-
this.getTopButtonBarData = function () {
|
|
256
|
-
return _this.mTopButtonBarData;
|
|
257
|
-
};
|
|
258
|
-
this.getMenuBarData = function () {
|
|
259
|
-
return _this.mMenuBarData;
|
|
260
|
-
};
|
|
261
|
-
this.getRighButtonBarData = function () {
|
|
262
|
-
return _this.mRighButtonBarData;
|
|
263
|
-
};
|
|
264
|
-
this.getLeftButtonBarData = function () {
|
|
265
|
-
return _this.mLeftButtonBarData;
|
|
266
|
-
};
|
|
267
|
-
this.getTitleButtonBarData = function () {
|
|
268
|
-
return _this.mTitleButtonBarData;
|
|
269
|
-
};
|
|
270
|
-
this.getLayerComboxData = function () {
|
|
271
|
-
return _this.mLayerComboxData;
|
|
272
|
-
};
|
|
273
|
-
this.getColorComboxData = function () {
|
|
274
|
-
return _this.mColorComboxData;
|
|
275
|
-
};
|
|
276
|
-
this.getLinetypeComboxData = function () {
|
|
277
|
-
return _this.mLinetypeComboxData;
|
|
278
|
-
};
|
|
279
|
-
this.getFooterData = function () {
|
|
280
|
-
return _this.mFooterData;
|
|
281
|
-
};
|
|
282
|
-
this.sendStringToExecute = function (sCmd) {
|
|
283
|
-
_this.mxFunObject.sendStringToExecute(sCmd);
|
|
284
|
-
};
|
|
285
|
-
this.getCmdLine = function () {
|
|
286
|
-
return _this.mComandLine;
|
|
287
|
-
};
|
|
288
|
-
this.getDynamicInput = function () {
|
|
289
|
-
return _this.mdynamicInput;
|
|
290
|
-
};
|
|
291
|
-
this.init = function (mxFun) {
|
|
292
|
-
_this.mxFunObject = mxFun;
|
|
293
|
-
};
|
|
294
|
-
this.OnMxEvent = function (event) {
|
|
295
|
-
var eventName = event.name;
|
|
296
|
-
if (eventName == undefined) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
var call = _this.mMxEvents[eventName];
|
|
300
|
-
if (call == undefined) {
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
call(event.param);
|
|
304
|
-
};
|
|
305
|
-
this.mountMxEvent = function (name, call) {
|
|
306
|
-
_this.mMxEvents[name] = call;
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
return MxVueInterface;
|
|
310
|
-
}());
|
|
311
|
-
exports.MxVueInterface = MxVueInterface;
|
|
312
|
-
exports.default = new MxVueInterface();
|
|
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;
|