mxdraw 0.1.213 → 0.1.215

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/mxdraw.d.ts CHANGED
@@ -12,70 +12,6 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
12
12
  */
13
13
  declare function loadCoreCode(): Promise<void>;
14
14
 
15
- /** @module MxCADObject */
16
- interface MxCADLayerTableRecord {
17
- id: number;
18
- name: string;
19
- color: number;
20
- off: boolean;
21
- }
22
- /**
23
- * MxCAD 对象,用来实现在线编辑功能
24
- *
25
- */
26
- declare class MxCADObject {
27
- private _mxCAD;
28
- constructor(mxCAD: any);
29
- /**
30
- * 新建一个图纸
31
- * @example
32
- * ```typescript
33
- *
34
- * ```
35
- */
36
- newFile(): void;
37
- /** 撤销操作 */
38
- undo(): void;
39
- /**
40
- * 打开个CAD文件
41
- * @example
42
- * ```typescript
43
- *
44
- * ```
45
- */
46
- openFile(file: string, retfun?: (ret: Object) => void): void;
47
- /**
48
- * 保存CAD文件
49
- * 文件保存路径,在bin/release/ini.json, 中server.savepath设置。默认保存到,bin/release/public/save目录下。
50
- * @example
51
- * ```typescript
52
- *
53
- * ```
54
- */
55
- saveFile(file: string, retfun: (ret: Object) => void): void;
56
- /**
57
- * 从服务器上得到显示数据
58
- * @example
59
- * ```typescript
60
- *
61
- * ```
62
- */
63
- getDisplayFromServer(): void;
64
- /**
65
- * 获取打开的文件名称
66
- * @param file 文件路径
67
- * @param retfun 保存文件后的回调函数
68
- *
69
- * */
70
- getFileName(): string;
71
- /**
72
- * 获取全部图层数据
73
- * @retruns 全部图层数据
74
- *
75
- * */
76
- getAllLayerData(): MxCADLayerTableRecord[];
77
- }
78
-
79
15
  type EventType = string | symbol;
80
16
  type PubSubEvent = Record<EventType, (...ages: any) => any>;
81
17
  declare class PubSub<Events extends PubSubEvent = PubSubEvent> {
@@ -1238,16 +1174,6 @@ declare class MxFunClass {
1238
1174
  * ```
1239
1175
  */
1240
1176
  docCoord2Screen(x: number | THREE.Vector3, y?: number): THREE.Vector3;
1241
- /**
1242
- * 获取当前MxCAD对象,该函数在MxCAD模式下使用
1243
- * @return MxDrawObjectType MxCAD对象
1244
- * @example
1245
- * ``` typescript
1246
- * const mxcad = Mx.MxFun.getCurrentMxCAD()
1247
- * console.log(mxcad)
1248
- * ```
1249
- */
1250
- getCurrentMxCAD(): MxCADObject;
1251
1177
  /**
1252
1178
  * 获取当前绘图控件对象
1253
1179
  * @return MxDrawObjectType 当前绘图控件对象
@@ -1559,15 +1485,14 @@ declare class MxFunClass {
1559
1485
  * 显示或隐藏图层
1560
1486
  * @param idLayer 图层id,或层名
1561
1487
  * @param isShow 是否显示
1562
- * @param isSketch 暂不使用
1563
1488
  * @return void
1564
1489
  * @example
1565
1490
  * ``` typescript
1566
- * Mx.MxFun.showLayer(366, true, false)
1567
- * Mx.MxFun.showLayer("2363", fasle, false)
1491
+ * Mx.MxFun.showLayer(366, true)
1492
+ * Mx.MxFun.showLayer("2363", fasle)
1568
1493
  * ```
1569
1494
  */
1570
- showLayer: (idLayer: number | string, isShow: boolean, isSketch?: boolean) => void;
1495
+ showLayer: (idLayer: number | string, isShow: boolean) => void;
1571
1496
  /**
1572
1497
  * 输出字符串到命令行.
1573
1498
  * @param sval 输出字符串
@@ -1601,20 +1526,6 @@ declare class MxFunClass {
1601
1526
  * ```
1602
1527
  */
1603
1528
  setIniset: (iniObj: iniConfig) => void;
1604
- /**
1605
- * 更新图纸图层数据
1606
- * @param dataLayers
1607
- * @return boolean 更新成功或失败
1608
- * @example
1609
- * ``` typescript
1610
- * if(Mx.MxFun.upDisplayForLayerData({
1611
- *
1612
- * })) {
1613
- * console.log("更新成功")
1614
- * }
1615
- * ```
1616
- */
1617
- upDisplayForLayerData: (dataLayers: any) => boolean;
1618
1529
  /**
1619
1530
  * 重新打开cad文件,该函数在控件创建完后,需要再次重新打开文件,调用。
1620
1531
  * @param sFile 打的cad文件路径
@@ -1770,6 +1681,10 @@ declare class MxFunClass {
1770
1681
  * 得以语言字符串
1771
1682
  * */
1772
1683
  getLanguageString: (id: string, sDef?: string) => string;
1684
+ /**
1685
+ * 把一个颜色变量转成一个数组颜色
1686
+ * */
1687
+ getNumberColor: (iColor: number | string | THREE.Color) => number;
1773
1688
  }
1774
1689
  declare const MxFun: MxFunClass;
1775
1690
 
@@ -1886,8 +1801,6 @@ type MxDrawEvents = {
1886
1801
  * {@link MxFun.createMxObject}中callback回调参数`mxDraw`的构造类
1887
1802
  * @function
1888
1803
  * {@link MxFun.getCurrentDraw} 方法返回值的构造类
1889
- * @function
1890
- * {@link MxFun.getCurrentMxCAD} 方法返回值的构造类
1891
1804
  *
1892
1805
  */
1893
1806
  declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
@@ -2577,14 +2490,6 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2577
2490
  * ```
2578
2491
  */
2579
2492
  setZoomSpeed(zoomSpeed: number): number;
2580
- /**
2581
- * 得到MxCAD对象.
2582
- * @return MxCADObject
2583
- * @example
2584
- * ``` typescript
2585
- * ```
2586
- */
2587
- getMxCAD(): MxCADObject;
2588
2493
  /**
2589
2494
  * 重新计数Renderer状态, this.renderer.info.reset();
2590
2495
  * @return
@@ -5306,8 +5211,6 @@ declare const Mx_MxDbHatch: typeof MxDbHatch;
5306
5211
  type Mx_MxDbLayerTableRecord = MxDbLayerTableRecord;
5307
5212
  type Mx_MxDbDatabase = MxDbDatabase;
5308
5213
  declare const Mx_MxDbDatabase: typeof MxDbDatabase;
5309
- type Mx_MxCADObject = MxCADObject;
5310
- declare const Mx_MxCADObject: typeof MxCADObject;
5311
5214
  type Mx_MxDbGroup = MxDbGroup;
5312
5215
  type Mx_MxDbGradientLine = MxDbGradientLine;
5313
5216
  declare const Mx_MxDbGradientLine: typeof MxDbGradientLine;
@@ -5402,7 +5305,6 @@ declare namespace Mx {
5402
5305
  Mx_MxDbHatch as MxDbHatch,
5403
5306
  Mx_MxDbLayerTableRecord as MxDbLayerTableRecord,
5404
5307
  Mx_MxDbDatabase as MxDbDatabase,
5405
- Mx_MxCADObject as MxCADObject,
5406
5308
  Mx_MxDbGroup as MxDbGroup,
5407
5309
  Mx_MxDbGradientLine as MxDbGradientLine,
5408
5310
  Mx_MxDbShape as MxDbShape,
@@ -5438,4 +5340,4 @@ declare global {
5438
5340
  }
5439
5341
  }
5440
5342
 
5441
- export { DetailedResult, DynamicInputType, Layer, McEdGetPointWorldDrawObject, McGePoint3d, McGePoint3dArray, McGeTool, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrAngle, MrxDbgUiPrBase, MrxDbgUiPrBaseReturn, MrxDbgUiPrDist, MrxDbgUiPrInt, MrxDbgUiPrKeyWord, MrxDbgUiPrPoint, MrxDbgUiPrString, MrxDbgUtils, Mx2PointArc, Mx3PointArc, MxCADObject, MxCursorType, MxDb2LineAngularDimension, MxDbAlignedDimension, MxDbAnyLine, MxDbArcShapeDraw, MxDbArea, MxDbArrow, MxDbCircleArc, MxDbCircleShape, MxDbCloudLine, MxDbCoord, MxDbDatabase, MxDbEllipse, MxDbEllipseArc, MxDbEllipseShape, MxDbEntity, MxDbGradientLine, MxDbGroup, MxDbHatch, MxDbImage, MxDbLayerTableRecord, MxDbLeadComment, MxDbLeadTag, MxDbLine, MxDbLineShape, MxDbPolyline, MxDbRect, MxDbRectBoxLeadComment, MxDbRegularPolygon, MxDbRegularPolygonShape, MxDbRingShape, MxDbSVG, MxDbSVGText, MxDbShape, MxDbSplineCurve, MxDbStarShape, MxDbText, MxDrawObject, MxFilters, MxFun, MxPaintBrush, MxThreeJS, MxType, Mxassembly, UserInputControls, Mx as default, loadCoreCode, store, useCanvasResizeListener };
5343
+ export { DetailedResult, DynamicInputType, Layer, McEdGetPointWorldDrawObject, McGePoint3d, McGePoint3dArray, McGeTool, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrAngle, MrxDbgUiPrBase, MrxDbgUiPrBaseReturn, MrxDbgUiPrDist, MrxDbgUiPrInt, MrxDbgUiPrKeyWord, MrxDbgUiPrPoint, MrxDbgUiPrString, MrxDbgUtils, Mx2PointArc, Mx3PointArc, MxCursorType, MxDb2LineAngularDimension, MxDbAlignedDimension, MxDbAnyLine, MxDbArcShapeDraw, MxDbArea, MxDbArrow, MxDbCircleArc, MxDbCircleShape, MxDbCloudLine, MxDbCoord, MxDbDatabase, MxDbEllipse, MxDbEllipseArc, MxDbEllipseShape, MxDbEntity, MxDbGradientLine, MxDbGroup, MxDbHatch, MxDbImage, MxDbLayerTableRecord, MxDbLeadComment, MxDbLeadTag, MxDbLine, MxDbLineShape, MxDbPolyline, MxDbRect, MxDbRectBoxLeadComment, MxDbRegularPolygon, MxDbRegularPolygonShape, MxDbRingShape, MxDbSVG, MxDbSVGText, MxDbShape, MxDbSplineCurve, MxDbStarShape, MxDbText, MxDrawObject, MxFilters, MxFun, MxPaintBrush, MxThreeJS, MxType, Mxassembly, UserInputControls, Mx as default, loadCoreCode, store, useCanvasResizeListener };