mxcad 1.0.255 → 1.0.257

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 CHANGED
@@ -12968,6 +12968,21 @@ export declare class MxCompare {
12968
12968
  */
12969
12969
  getResult(): any[];
12970
12970
  }
12971
+ /**
12972
+ * MxModifyColor 批量修改图上对象颜色
12973
+ */
12974
+ export declare class MxModifyColor {
12975
+ private imp;
12976
+ constructor();
12977
+ /**
12978
+ * 修改图上对象颜色。
12979
+ */
12980
+ Do(database: McDbDatabase, color: McCmColor): boolean;
12981
+ /**
12982
+ *恢复图上对象颜色。
12983
+ */
12984
+ DoRestore(): void;
12985
+ }
12971
12986
  /**
12972
12987
  * 指定执行克隆操作时的行为类型
12973
12988
  */
@@ -14709,6 +14724,7 @@ export declare class MxCAD3DObject {
14709
14724
  setDisplayMode(theMode: MdGe.MxGlobalDisplayMode): void;
14710
14725
  enableDirLightSrc(theToEnabled: boolean): void;
14711
14726
  setCubemapBackground(theRight: string, theLeft: string, theTop: string, theBottom: string, theFront: string, theBack: string): void;
14727
+ setManipulatorEnabled(isEnabled: boolean): void;
14712
14728
  getImp(): any;
14713
14729
  getCtx(): any;
14714
14730
  updateCanvasSize(): void;
@@ -16739,6 +16755,7 @@ export declare class Mx3dView extends Mx3dBaseObject {
16739
16755
  setDisplayMode(theMode: MdGe.MxGlobalDisplayMode): void;
16740
16756
  enableDirLightSrc(theToEnabled: boolean): void;
16741
16757
  setCubemapBackground(theRight: string, theLeft: string, theTop: string, theBottom: string, theFront: string, theBack: string): void;
16758
+ setManipulatorEnabled(isEnabled: boolean): void;
16742
16759
  }
16743
16760
  /**
16744
16761
  * 表示颜色对象的类。
package/dist/mxcad.es.js CHANGED
@@ -14186,7 +14186,7 @@ win.McDrawObjectEvent_asciiToUTF8 = function (hexstr) {
14186
14186
  return MxG2312Obj.decodeFromGb2312(hexstr);
14187
14187
  };
14188
14188
 
14189
- const version$1 = "1.0.255";
14189
+ const version$1 = "1.0.257";
14190
14190
 
14191
14191
  var isSharedArrayBuffer = ("SharedArrayBuffer" in window);
14192
14192
  var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
@@ -21778,6 +21778,25 @@ var MxCompare = /*#__PURE__*/function () {
21778
21778
  }]);
21779
21779
  return MxCompare;
21780
21780
  }();
21781
+ var MxModifyColor = /*#__PURE__*/function () {
21782
+ function MxModifyColor() {
21783
+ _classCallCheck$1(this, MxModifyColor);
21784
+ _defineProperty(this, "imp", void 0);
21785
+ this.imp = new MxCpp.mxcadassemblyimp.MxTempModifyColor();
21786
+ }
21787
+ _createClass$1(MxModifyColor, [{
21788
+ key: "Do",
21789
+ value: function Do(database, color) {
21790
+ return this.imp.Do(database.imp, color.getImp());
21791
+ }
21792
+ }, {
21793
+ key: "DoRestore",
21794
+ value: function DoRestore() {
21795
+ this.imp.DoRestore();
21796
+ }
21797
+ }]);
21798
+ return MxModifyColor;
21799
+ }();
21781
21800
 
21782
21801
  var MxCpp;
21783
21802
  function loadMxCADassembly(_x) {
@@ -25659,7 +25678,7 @@ function _getMxreleaseidId() {
25659
25678
  }
25660
25679
  var createMxCad = /*#__PURE__*/function () {
25661
25680
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(config, mxcadobj) {
25662
- var _ref2, openParameter, networkFonts, fontspath, locateFile, wasmBinary, canvas, onOpenFileComplete, fileUrl, onInit, middlePan, registdata, registfile, viewBackgroundColor, map, multipleSelect, enableUndo, mouseMiddlePan, enableIntelliSelect, browse, webgl1, mxDraw, THREE, size, mxCadObj, registfileurl, regdataobj, fetchAttributes;
25681
+ var _ref2, openParameter, networkFonts, fontspath, locateFile, wasmBinary, canvas, onOpenFileComplete, fileUrl, onInit, middlePan, registdata, registfile, viewBackgroundColor, map, multipleSelect, enableUndo, mouseMiddlePan, enableIntelliSelect, browse, webgl1, mxDraw, THREE, size, mxCadObj, iCodeVersion, registfileurl, regdataobj, fetchAttributes;
25663
25682
  return regenerator.wrap(function _callee$(_context) {
25664
25683
  while (1) switch (_context.prev = _context.next) {
25665
25684
  case 0:
@@ -25711,32 +25730,33 @@ var createMxCad = /*#__PURE__*/function () {
25711
25730
  size = new THREE.Vector2();
25712
25731
  mxDraw.getRenderer().getSize(size);
25713
25732
  mxCadObj = createMxCadCppObject(MxCpp.App.getImp(), size.width, size.height, mxDraw.getCanvas().id, mxDraw.isWebgl2(), mxDraw.getId(), map ? true : false, mxcadobj);
25714
- if (mxCadObj.isTryVersion()) {
25715
- _context.next = 34;
25733
+ iCodeVersion = mxCadObj.getImp().getCodeVersion();
25734
+ if (!(iCodeVersion != 1 && iCodeVersion != 2)) {
25735
+ _context.next = 35;
25716
25736
  break;
25717
25737
  }
25718
25738
  if (!(registdata && registdata.length > 0)) {
25719
- _context.next = 28;
25739
+ _context.next = 29;
25720
25740
  break;
25721
25741
  }
25722
25742
  mxCadObj.initRegist(registdata);
25723
- _context.next = 34;
25743
+ _context.next = 35;
25724
25744
  break;
25725
- case 28:
25745
+ case 29:
25726
25746
  registfileurl = registfile;
25727
25747
  if (!(registfile && registfile.length > 0)) {
25728
25748
  registfileurl = "mxkey.json.frontpage.json";
25729
25749
  }
25730
- _context.next = 32;
25750
+ _context.next = 33;
25731
25751
  return getJsonFromUrl(registfileurl);
25732
- case 32:
25752
+ case 33:
25733
25753
  regdataobj = _context.sent;
25734
25754
  if (regdataobj && regdataobj.registdata) {
25735
25755
  mxCadObj.initRegist(regdataobj.registdata);
25736
25756
  } else {
25737
25757
  console.log("MxTip:empty regist data");
25738
25758
  }
25739
- case 34:
25759
+ case 35:
25740
25760
  getMxreleaseidId().then(function (val) {
25741
25761
  mxCadObj.getImp().SetAppId(val);
25742
25762
  });
@@ -25764,7 +25784,7 @@ var createMxCad = /*#__PURE__*/function () {
25764
25784
  mxCadObj.openWebFile(fileUrl, void 0, true, openParameter, fetchAttributes);
25765
25785
  }
25766
25786
  return _context.abrupt("return", mxCadObj);
25767
- case 40:
25787
+ case 41:
25768
25788
  case "end":
25769
25789
  return _context.stop();
25770
25790
  }
@@ -26436,9 +26456,13 @@ function _Mx_Point() {
26436
26456
  }));
26437
26457
  return _Mx_Point.apply(this, arguments);
26438
26458
  }
26459
+ function Mx_About() {
26460
+ console.log(MxCpp.App.getVersionString());
26461
+ }
26439
26462
  MxFun.on("init", function () {
26440
26463
  MxFun.addCommand("Mx_Line", drawLine);
26441
26464
  MxFun.addCommand("Mx_Point", Mx_Point);
26465
+ MxFun.addCommand("Mx_About", Mx_About);
26442
26466
  });
26443
26467
 
26444
26468
  function drawMText() {
@@ -35519,6 +35543,11 @@ var MxCAD3DObject = /*#__PURE__*/function () {
35519
35543
  value: function setCubemapBackground(theRight, theLeft, theTop, theBottom, theFront, theBack) {
35520
35544
  this.imp.setCubemapBackground(theRight, theLeft, theTop, theBottom, theFront, theBack);
35521
35545
  }
35546
+ }, {
35547
+ key: "setManipulatorEnabled",
35548
+ value: function setManipulatorEnabled(isEnabled) {
35549
+ this.imp.setManipulatorEnabled(isEnabled);
35550
+ }
35522
35551
  }, {
35523
35552
  key: "getImp",
35524
35553
  value: function getImp() {
@@ -38024,6 +38053,11 @@ var Mx3dView = /*#__PURE__*/function (_Mx3dBaseObject9) {
38024
38053
  value: function setCubemapBackground(theRight, theLeft, theTop, theBottom, theFront, theBack) {
38025
38054
  this.imp.setCubemapBackground(theRight, theLeft, theTop, theBottom, theFront, theBack);
38026
38055
  }
38056
+ }, {
38057
+ key: "setManipulatorEnabled",
38058
+ value: function setManipulatorEnabled(isEnabled) {
38059
+ this.imp.setManipulatorEnabled(isEnabled);
38060
+ }
38027
38061
  }]);
38028
38062
  return Mx3dView;
38029
38063
  }(Mx3dBaseObject);
@@ -48432,6 +48466,7 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
48432
48466
  MxPropertiesWindowCustomValue,
48433
48467
  MxPropertiesWindowCustom,
48434
48468
  MxCompare,
48469
+ MxModifyColor,
48435
48470
  MxCADCloneType,
48436
48471
  IMcDbDwgFiler,
48437
48472
  MxCADWorldDraw,
@@ -48560,4 +48595,4 @@ globalThis.Buffer = buffer$1.Buffer;
48560
48595
  globalThis.Buffer.alloc = buffer$1.Buffer.alloc;
48561
48596
  globalThis.Buffer.from = buffer$1.Buffer.from;
48562
48597
 
48563
- export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRasterImage, McDbRasterImageDef, McDbRotatedDimension, McDbSpatialFilter, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McRxObject, MdGe, Mx3dAlgoChamfer, Mx3dAlgoFillet, Mx3dAlgoFillet2d, Mx3dAlgoObject, Mx3dApplication, Mx3dAspectArrow, Mx3dAspectDim, Mx3dAspectLine, Mx3dAspectObject, Mx3dAspectText, Mx3dBaseObject, Mx3dBrepCastGeom, Mx3dDbDocument, Mx3dDbLabel, Mx3dDbObject, Mx3dDimAngle, Mx3dDimDiameter, Mx3dDimLength, Mx3dDimObject, Mx3dDimRadius, Mx3dGeAxis, Mx3dGeBndBox, Mx3dGeCSYS, Mx3dGeCSYSR, Mx3dGeCircle, Mx3dGeColor, Mx3dGeConic, Mx3dGeCurve, Mx3dGeCylinder, Mx3dGeDir, Mx3dGeEllipse, Mx3dGeHyperbola, Mx3dGeLine, Mx3dGeLocation, Mx3dGeMaterial, Mx3dGeObject, Mx3dGePlane, Mx3dGePoint, Mx3dGeTrsf, Mx3dGeVec, Mx3dGeomBSplineCurve, Mx3dGeomBSplineSurface, Mx3dGeomBezierCurve, Mx3dGeomBezierSurface, Mx3dGeomBoundedCurve, Mx3dGeomBoundedSurface, Mx3dGeomCircle, Mx3dGeomConic, Mx3dGeomConicalSurface, Mx3dGeomCurve, Mx3dGeomCylindricalSurface, Mx3dGeomElementarySurface, Mx3dGeomEllipse, Mx3dGeomHyperbola, Mx3dGeomLine, Mx3dGeomObject, Mx3dGeomParabola, Mx3dGeomPlane, Mx3dGeomSphericalSurface, Mx3dGeomSurface, Mx3dGeomToroidalSurface, Mx3dInterpolateBSplineCurve, Mx3dMkBox, Mx3dMkCone, Mx3dMkCylinder, Mx3dMkFace, Mx3dMkLoft, Mx3dMkObject, Mx3dMkPipe, Mx3dMkPolygon, Mx3dMkPrism, Mx3dMkRevol, Mx3dMkSphere, Mx3dMkThickSolid, Mx3dMkTorus, Mx3dMkWedge, Mx3dShapeCompSolid, Mx3dShapeCompound, Mx3dShapeDownCast, Mx3dShapeEdge, Mx3dShapeFace, Mx3dShapeObject, Mx3dShapeShell, Mx3dShapeSolid, Mx3dShapeVertex, Mx3dShapeWire, Mx3dSymbolObject, Mx3dSymbolText, Mx3dUtils, Mx3dView, Mx3dWireTool, MxApp3D, MxCAD3DObject, MxCADCloneType, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCheckTheBrowser, MxCompare, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTools, Mx_Erase, _ML_String, b64Decode, b64Encode, 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 };
48598
+ export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRasterImage, McDbRasterImageDef, McDbRotatedDimension, McDbSpatialFilter, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McRxObject, MdGe, Mx3dAlgoChamfer, Mx3dAlgoFillet, Mx3dAlgoFillet2d, Mx3dAlgoObject, Mx3dApplication, Mx3dAspectArrow, Mx3dAspectDim, Mx3dAspectLine, Mx3dAspectObject, Mx3dAspectText, Mx3dBaseObject, Mx3dBrepCastGeom, Mx3dDbDocument, Mx3dDbLabel, Mx3dDbObject, Mx3dDimAngle, Mx3dDimDiameter, Mx3dDimLength, Mx3dDimObject, Mx3dDimRadius, Mx3dGeAxis, Mx3dGeBndBox, Mx3dGeCSYS, Mx3dGeCSYSR, Mx3dGeCircle, Mx3dGeColor, Mx3dGeConic, Mx3dGeCurve, Mx3dGeCylinder, Mx3dGeDir, Mx3dGeEllipse, Mx3dGeHyperbola, Mx3dGeLine, Mx3dGeLocation, Mx3dGeMaterial, Mx3dGeObject, Mx3dGePlane, Mx3dGePoint, Mx3dGeTrsf, Mx3dGeVec, Mx3dGeomBSplineCurve, Mx3dGeomBSplineSurface, Mx3dGeomBezierCurve, Mx3dGeomBezierSurface, Mx3dGeomBoundedCurve, Mx3dGeomBoundedSurface, Mx3dGeomCircle, Mx3dGeomConic, Mx3dGeomConicalSurface, Mx3dGeomCurve, Mx3dGeomCylindricalSurface, Mx3dGeomElementarySurface, Mx3dGeomEllipse, Mx3dGeomHyperbola, Mx3dGeomLine, Mx3dGeomObject, Mx3dGeomParabola, Mx3dGeomPlane, Mx3dGeomSphericalSurface, Mx3dGeomSurface, Mx3dGeomToroidalSurface, Mx3dInterpolateBSplineCurve, Mx3dMkBox, Mx3dMkCone, Mx3dMkCylinder, Mx3dMkFace, Mx3dMkLoft, Mx3dMkObject, Mx3dMkPipe, Mx3dMkPolygon, Mx3dMkPrism, Mx3dMkRevol, Mx3dMkSphere, Mx3dMkThickSolid, Mx3dMkTorus, Mx3dMkWedge, Mx3dShapeCompSolid, Mx3dShapeCompound, Mx3dShapeDownCast, Mx3dShapeEdge, Mx3dShapeFace, Mx3dShapeObject, Mx3dShapeShell, Mx3dShapeSolid, Mx3dShapeVertex, Mx3dShapeWire, Mx3dSymbolObject, Mx3dSymbolText, Mx3dUtils, Mx3dView, Mx3dWireTool, MxApp3D, MxCAD3DObject, MxCADCloneType, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCheckTheBrowser, MxCompare, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTools, Mx_Erase, _ML_String, b64Decode, b64Encode, 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 };