mxcad 1.0.367 → 1.0.368
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/mxcad.d.ts +44 -0
- package/dist/mxcad.es.js +127 -2
- package/dist/mxcad.umd.js +3 -3
- package/dist/wasm/2d/mxdrawassembly_min.js +1771 -1768
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +1780 -1777
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -11899,6 +11899,7 @@ declare class McRxObjectImp {
|
|
|
11899
11899
|
export declare class McObject {
|
|
11900
11900
|
/** 内部对象实现 */
|
|
11901
11901
|
private imp;
|
|
11902
|
+
private cooperate;
|
|
11902
11903
|
/** 内部事件 */
|
|
11903
11904
|
private event;
|
|
11904
11905
|
/** 当前打开的文件名 */
|
|
@@ -11932,6 +11933,13 @@ export declare class McObject {
|
|
|
11932
11933
|
* ```
|
|
11933
11934
|
*/
|
|
11934
11935
|
getTempDraw(): McObjectTempDraw;
|
|
11936
|
+
/**
|
|
11937
|
+
* 返回协同工作对象
|
|
11938
|
+
* @example
|
|
11939
|
+
* ```ts
|
|
11940
|
+
* ```
|
|
11941
|
+
*/
|
|
11942
|
+
getCooperate(): MxCooperate;
|
|
11935
11943
|
/**
|
|
11936
11944
|
* 判断层是不是一个在使用的有用层,删除一个层之前调用该函数判断一下。
|
|
11937
11945
|
* @example
|
|
@@ -14211,6 +14219,42 @@ export declare class MxCADTempForbiddenIntelliSelect {
|
|
|
14211
14219
|
constructor(isForbidden?: boolean);
|
|
14212
14220
|
restoreSettings(): void;
|
|
14213
14221
|
}
|
|
14222
|
+
/**
|
|
14223
|
+
* 协同工作
|
|
14224
|
+
*/
|
|
14225
|
+
export declare class MxCooperate {
|
|
14226
|
+
private mxcad;
|
|
14227
|
+
constructor(mxcad: McObject);
|
|
14228
|
+
/**
|
|
14229
|
+
*创建协同工作
|
|
14230
|
+
*/
|
|
14231
|
+
createWrok(retCall?: (iRet: number, workName: string) => void): number;
|
|
14232
|
+
/**
|
|
14233
|
+
*得到当前正在协同的工作名列表
|
|
14234
|
+
*/
|
|
14235
|
+
getWorks(retCall: (workNames: string[]) => void): number;
|
|
14236
|
+
/**
|
|
14237
|
+
*创建协同工作
|
|
14238
|
+
*/
|
|
14239
|
+
joinWork(wrokName: string, retCall?: (iRet: number) => void): number;
|
|
14240
|
+
/**
|
|
14241
|
+
*初始化参数
|
|
14242
|
+
*比如:{server_addres:"http://localhost:3091"}
|
|
14243
|
+
*/
|
|
14244
|
+
init(param: object): any;
|
|
14245
|
+
/**
|
|
14246
|
+
*退出当前协同工作
|
|
14247
|
+
*/
|
|
14248
|
+
exitWrok(): number;
|
|
14249
|
+
/**
|
|
14250
|
+
*得到当前协同的状态
|
|
14251
|
+
*/
|
|
14252
|
+
getStatus(): number;
|
|
14253
|
+
/**
|
|
14254
|
+
*挂载协同工作事件处理
|
|
14255
|
+
*/
|
|
14256
|
+
onEvent(retCall: (eventName: string, iRet: number) => void): void;
|
|
14257
|
+
}
|
|
14214
14258
|
/**
|
|
14215
14259
|
* 指定执行克隆操作时的行为类型
|
|
14216
14260
|
*/
|
package/dist/mxcad.es.js
CHANGED
|
@@ -15080,7 +15080,7 @@ win.McDrawObjectEvent_asciiToUTF8 = function (hexstr) {
|
|
|
15080
15080
|
return MxG2312Obj.decodeFromGb2312Imp(hexstr);
|
|
15081
15081
|
};
|
|
15082
15082
|
|
|
15083
|
-
const version$1 = "1.0.
|
|
15083
|
+
const version$1 = "1.0.367";
|
|
15084
15084
|
|
|
15085
15085
|
var isSharedArrayBuffer = "SharedArrayBuffer" in window;
|
|
15086
15086
|
var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
|
|
@@ -22487,6 +22487,7 @@ var McObject = /*#__PURE__*/function () {
|
|
|
22487
22487
|
function McObject(imp) {
|
|
22488
22488
|
_classCallCheck$1(this, McObject);
|
|
22489
22489
|
_defineProperty(this, "imp", void 0);
|
|
22490
|
+
_defineProperty(this, "cooperate", void 0);
|
|
22490
22491
|
_defineProperty(this, "event", {});
|
|
22491
22492
|
_defineProperty(this, "currentFileName", "");
|
|
22492
22493
|
_defineProperty(this, "currentOriginalFileName", "");
|
|
@@ -22494,6 +22495,7 @@ var McObject = /*#__PURE__*/function () {
|
|
|
22494
22495
|
_defineProperty(this, "authorized_service", "");
|
|
22495
22496
|
_defineProperty(this, "isInitMxObject", false);
|
|
22496
22497
|
this.imp = imp;
|
|
22498
|
+
this.cooperate = new MxCooperate(this);
|
|
22497
22499
|
}
|
|
22498
22500
|
_createClass$1(McObject, [{
|
|
22499
22501
|
key: "creaeCallId",
|
|
@@ -22505,6 +22507,11 @@ var McObject = /*#__PURE__*/function () {
|
|
|
22505
22507
|
value: function getTempDraw() {
|
|
22506
22508
|
return new McObjectTempDraw(this.imp.getTempDraw());
|
|
22507
22509
|
}
|
|
22510
|
+
}, {
|
|
22511
|
+
key: "getCooperate",
|
|
22512
|
+
value: function getCooperate() {
|
|
22513
|
+
return this.cooperate;
|
|
22514
|
+
}
|
|
22508
22515
|
}, {
|
|
22509
22516
|
key: "isUselessLayer",
|
|
22510
22517
|
value: function isUselessLayer(layerName) {
|
|
@@ -24400,6 +24407,96 @@ var MxCADTempForbiddenIntelliSelect = /*#__PURE__*/function () {
|
|
|
24400
24407
|
}]);
|
|
24401
24408
|
return MxCADTempForbiddenIntelliSelect;
|
|
24402
24409
|
}();
|
|
24410
|
+
var MxCooperate = /*#__PURE__*/function () {
|
|
24411
|
+
function MxCooperate(mxcad) {
|
|
24412
|
+
_classCallCheck$1(this, MxCooperate);
|
|
24413
|
+
_defineProperty(this, "mxcad", void 0);
|
|
24414
|
+
this.mxcad = mxcad;
|
|
24415
|
+
}
|
|
24416
|
+
_createClass$1(MxCooperate, [{
|
|
24417
|
+
key: "createWrok",
|
|
24418
|
+
value: function createWrok(retCall) {
|
|
24419
|
+
var win = window;
|
|
24420
|
+
win["coordinate_createWrok"] = function (_id, param) {
|
|
24421
|
+
win["coordinate_createWrok"] = void 0;
|
|
24422
|
+
try {
|
|
24423
|
+
var paramobj = JSON.parse(param);
|
|
24424
|
+
retCall && retCall(paramobj.l_param, paramobj.str_param);
|
|
24425
|
+
} catch (error) {
|
|
24426
|
+
console.log(error);
|
|
24427
|
+
retCall && retCall(-1, "");
|
|
24428
|
+
}
|
|
24429
|
+
};
|
|
24430
|
+
return this.mxcad.getImp().cooperate_createWrok();
|
|
24431
|
+
}
|
|
24432
|
+
}, {
|
|
24433
|
+
key: "getWorks",
|
|
24434
|
+
value: function getWorks(retCall) {
|
|
24435
|
+
var win = window;
|
|
24436
|
+
win["coordinate_getWroks"] = function (_id, param) {
|
|
24437
|
+
win["coordinate_getWroks"] = void 0;
|
|
24438
|
+
try {
|
|
24439
|
+
var paramobj = JSON.parse(param);
|
|
24440
|
+
if (paramobj.l_param == 0) {
|
|
24441
|
+
retCall(paramobj.str_param);
|
|
24442
|
+
} else {
|
|
24443
|
+
retCall([]);
|
|
24444
|
+
}
|
|
24445
|
+
} catch (error) {
|
|
24446
|
+
console.log(error);
|
|
24447
|
+
retCall([]);
|
|
24448
|
+
}
|
|
24449
|
+
};
|
|
24450
|
+
return this.mxcad.getImp().cooperate_getWorks();
|
|
24451
|
+
}
|
|
24452
|
+
}, {
|
|
24453
|
+
key: "joinWork",
|
|
24454
|
+
value: function joinWork(wrokName, retCall) {
|
|
24455
|
+
var win = window;
|
|
24456
|
+
win["coordinate_createWrok"] = function (_id, param) {
|
|
24457
|
+
win["coordinate_joinWork"] = void 0;
|
|
24458
|
+
try {
|
|
24459
|
+
var paramobj = JSON.parse(param);
|
|
24460
|
+
retCall && retCall(paramobj.l_param);
|
|
24461
|
+
} catch (error) {
|
|
24462
|
+
console.log(error);
|
|
24463
|
+
retCall && retCall(-1);
|
|
24464
|
+
}
|
|
24465
|
+
};
|
|
24466
|
+
return this.mxcad.getImp().cooperate_joinWork(wrokName);
|
|
24467
|
+
}
|
|
24468
|
+
}, {
|
|
24469
|
+
key: "init",
|
|
24470
|
+
value: function init(param) {
|
|
24471
|
+
return this.mxcad.getImp().cooperate_init(JSON.stringify(param));
|
|
24472
|
+
}
|
|
24473
|
+
}, {
|
|
24474
|
+
key: "exitWrok",
|
|
24475
|
+
value: function exitWrok() {
|
|
24476
|
+
return this.mxcad.getImp().cooperate_exitWrok();
|
|
24477
|
+
}
|
|
24478
|
+
}, {
|
|
24479
|
+
key: "getStatus",
|
|
24480
|
+
value: function getStatus() {
|
|
24481
|
+
return this.mxcad.getImp().cooperate_status();
|
|
24482
|
+
}
|
|
24483
|
+
}, {
|
|
24484
|
+
key: "onEvent",
|
|
24485
|
+
value: function onEvent(retCall) {
|
|
24486
|
+
var win = window;
|
|
24487
|
+
win["coordinate_joinWork_complete"] = function (_id, param) {
|
|
24488
|
+
try {
|
|
24489
|
+
var paramobj = JSON.parse(param);
|
|
24490
|
+
retCall("coordinate_joinWork_complete", paramobj.l_param);
|
|
24491
|
+
} catch (error) {
|
|
24492
|
+
console.log(error);
|
|
24493
|
+
retCall("coordinate_joinWork_complete", -1);
|
|
24494
|
+
}
|
|
24495
|
+
};
|
|
24496
|
+
}
|
|
24497
|
+
}]);
|
|
24498
|
+
return MxCooperate;
|
|
24499
|
+
}();
|
|
24403
24500
|
|
|
24404
24501
|
var MxCpp = new MxCppType();
|
|
24405
24502
|
function loadMxCADassembly(_x) {
|
|
@@ -38300,6 +38397,31 @@ function _Mx_Xor() {
|
|
|
38300
38397
|
}));
|
|
38301
38398
|
return _Mx_Xor.apply(this, arguments);
|
|
38302
38399
|
}
|
|
38400
|
+
function Mx_Cooperate_Create() {
|
|
38401
|
+
var cooperate = MxCpp.mxcad.getCooperate();
|
|
38402
|
+
cooperate.createWrok(function (iRet, workName) {
|
|
38403
|
+
if (iRet == 0) {
|
|
38404
|
+
console.log("create cooperate ok,work name:" + workName);
|
|
38405
|
+
} else {
|
|
38406
|
+
console.log("create cooperate failed,error code:" + iRet);
|
|
38407
|
+
}
|
|
38408
|
+
});
|
|
38409
|
+
}
|
|
38410
|
+
function Mx_Cooperate_Join() {
|
|
38411
|
+
var cooperate = MxCpp.mxcad.getCooperate();
|
|
38412
|
+
cooperate.getWorks(function (wroks) {
|
|
38413
|
+
if (wroks.length > 0) {
|
|
38414
|
+
cooperate.joinWork(wroks[0], function (iRet) {
|
|
38415
|
+
if (iRet == 0) {
|
|
38416
|
+
console.log("join cooperate ok,work name:" + wroks[0]);
|
|
38417
|
+
} else {
|
|
38418
|
+
console.log("join cooperate failed,error code:" + iRet);
|
|
38419
|
+
}
|
|
38420
|
+
});
|
|
38421
|
+
}
|
|
38422
|
+
console.log(wroks);
|
|
38423
|
+
});
|
|
38424
|
+
}
|
|
38303
38425
|
MxFun.on("init", function () {
|
|
38304
38426
|
MxFun.addCommand("Mx_Line", drawLine);
|
|
38305
38427
|
MxFun.addCommand("Mx_Point", Mx_Point);
|
|
@@ -38312,6 +38434,8 @@ MxFun.on("init", function () {
|
|
|
38312
38434
|
MxFun.addCommand("Mx_Intersection", Mx_Intersection);
|
|
38313
38435
|
MxFun.addCommand("Mx_Difference", Mx_Difference);
|
|
38314
38436
|
MxFun.addCommand("Mx_Xor", Mx_Xor);
|
|
38437
|
+
MxFun.addCommand("Mx_Cooperate_Create", Mx_Cooperate_Create);
|
|
38438
|
+
MxFun.addCommand("Mx_Cooperate_Join", Mx_Cooperate_Join);
|
|
38315
38439
|
});
|
|
38316
38440
|
|
|
38317
38441
|
function drawMText() {
|
|
@@ -103685,6 +103809,7 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
103685
103809
|
MxCompare,
|
|
103686
103810
|
MxModifyColor,
|
|
103687
103811
|
MxCADTempForbiddenIntelliSelect,
|
|
103812
|
+
MxCooperate,
|
|
103688
103813
|
MxCADCloneType,
|
|
103689
103814
|
MxCADWorldDrawType,
|
|
103690
103815
|
IMcDbDwgFiler,
|
|
@@ -103729,4 +103854,4 @@ globalThis.Buffer = buffer$1.Buffer;
|
|
|
103729
103854
|
globalThis.Buffer.alloc = buffer$1.Buffer.alloc;
|
|
103730
103855
|
globalThis.Buffer.from = buffer$1.Buffer.from;
|
|
103731
103856
|
|
|
103732
|
-
export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, MLineJustificationType, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDiametricDimension, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch$1 as McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMLine, McDbMText, McDbMxRegion, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRadialDimension, McDbRasterImage, McDbRasterImageDef, McDbRay, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXline, McDbXlsxTable, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McObjectTempDraw, McRxObject, MxCADBaseCustomElement, MxCADBaseCustomText, MxCADCloneType, MxCADMText, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADTempForbiddenIntelliSelect, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrPointTransform, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCADWorldDrawType, MxCanvas2Image, MxCheckTheBrowser, MxCompare, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTIFFLoader, MxTools, Mx_About, Mx_Erase, TableRenderDirection, _ML_String, b64Decode, b64Encode, crateHexString, createCursor, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
|
|
103857
|
+
export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, MLineJustificationType, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDiametricDimension, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch$1 as McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMLine, McDbMText, McDbMxRegion, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRadialDimension, McDbRasterImage, McDbRasterImageDef, McDbRay, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXline, McDbXlsxTable, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McObjectTempDraw, McRxObject, MxCADBaseCustomElement, MxCADBaseCustomText, MxCADCloneType, MxCADMText, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADTempForbiddenIntelliSelect, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrPointTransform, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCADWorldDrawType, MxCanvas2Image, MxCheckTheBrowser, MxCompare, MxCooperate, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTIFFLoader, MxTools, Mx_About, Mx_Erase, TableRenderDirection, _ML_String, b64Decode, b64Encode, crateHexString, createCursor, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
|