mxdraw 0.1.54 → 0.1.57

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.
@@ -0,0 +1,41 @@
1
+ /** @module MxCADObject */
2
+ /**
3
+ * MxCAD 对象,用来实现在线编辑功能
4
+ *
5
+ */
6
+ export default class MxCADObject {
7
+ private _mxCAD;
8
+ constructor(mxCAD: any);
9
+ /**
10
+ * 新建一个图纸
11
+ * @example
12
+ * ```typescript
13
+ *
14
+ * ```
15
+ */
16
+ newFile(): void;
17
+ /**
18
+ * 打开个CAD文件
19
+ * @example
20
+ * ```typescript
21
+ *
22
+ * ```
23
+ */
24
+ openFile(file: string, retfun?: (ret: Object) => void): void;
25
+ /**
26
+ * 保存CAD文件
27
+ * @example
28
+ * ```typescript
29
+ *
30
+ * ```
31
+ */
32
+ saveFile(file: string, retfun: (ret: Object) => void): void;
33
+ /**
34
+ * 从服务器上得到显示数据
35
+ * @example
36
+ * ```typescript
37
+ *
38
+ * ```
39
+ */
40
+ getDisplayFromServer(): void;
41
+ }
@@ -0,0 +1,3 @@
1
+ /** @module MxDrawObject */
2
+ import MxCADObject from './MxCADObject';
3
+ export default MxCADObject;
@@ -1,4 +1,5 @@
1
1
  /** @module MxDrawObject */
2
+ import MxCADObject from '../MxCADObject';
2
3
  import MxDbDatabase from '../MxDbDatabase';
3
4
  import MxDbEntity from '../MxDbEntity';
4
5
  export interface MxDrawObjectType {
@@ -729,4 +730,12 @@ export default class MxDrawObject {
729
730
  * ```
730
731
  */
731
732
  setZoomSpeed(zoomSpeed: number): number;
733
+ /**
734
+ * 得到MxCAD对象.
735
+ * @return MxCADObject
736
+ * @example
737
+ * ``` typescript
738
+ * ```
739
+ */
740
+ getMxCAD(): MxCADObject;
732
741
  }
@@ -121,7 +121,7 @@ export default class MxFun {
121
121
  * })
122
122
  * ```
123
123
  */
124
- createMxObject({ canvasId, cadFile, callback, isNewFile, useWebsocket, isAutoResize, mapBox }: {
124
+ createMxObject({ canvasId, cadFile, callback, isNewFile, useWebsocket, isAutoResize, mapBox, isMxCAD }: {
125
125
  canvasId?: string;
126
126
  cadFile?: string | string[];
127
127
  callback?: (mxDraw: MxDrawObject, dom: {
@@ -132,6 +132,7 @@ export default class MxFun {
132
132
  useWebsocket?: boolean;
133
133
  isAutoResize?: boolean;
134
134
  mapBox?: any;
135
+ isMxCAD?: boolean;
135
136
  }): void;
136
137
  /**
137
138
  * 为程序设置服务器地址
@@ -562,6 +563,11 @@ export default class MxFun {
562
563
  * @parma callback 回调函数中返回坐标信息
563
564
  * */
564
565
  listenForCoordTip(callback: (coordTip: string) => void): void;
566
+ /**
567
+ * 监听光标更新
568
+ * @parma cursorType当前使用的光标类型
569
+ * */
570
+ listenForUpdateCursor: (callback: ((cursorType: string) => void) | undefined) => void;
565
571
  /**
566
572
  * 返回mxfun.min.js中的THREE.JS对象,可以用它来创建mxfun.min.js中THREE对象。
567
573
  * */
@@ -570,5 +576,9 @@ export default class MxFun {
570
576
  * 返回mxfun.min.js中的ThreeJsTool对象
571
577
  * */
572
578
  getMxFunThreeTool(): any;
579
+ /**
580
+ * 创建十字光标图片
581
+ * */
582
+ ceneratecursor(cursorSize?: number, squareSize?: number, isRoss?: boolean): HTMLImageElement;
573
583
  }
574
584
  export {};
@@ -62,7 +62,7 @@ declare class MxDynamicInput {
62
62
  }
63
63
  export declare class MxVueInterface {
64
64
  mSetCoordFun: ((coordTip: string) => void) | undefined;
65
- mUpdateCursorFun: (() => void) | undefined;
65
+ mUpdateCursorFun: ((cursorType: string) => void) | undefined;
66
66
  mOnKeydownEvent: ((arg0: any) => void) | undefined;
67
67
  mCursorType: string;
68
68
  mComandLine: MxVueComandLine;
@@ -82,7 +82,7 @@ export declare class MxVueInterface {
82
82
  mLayerComboxData: any;
83
83
  mColorComboxData: any;
84
84
  mountSetCoordFun: (fun: ((coordTip: string) => void) | undefined) => void;
85
- mountUpdateCursorFun: (fun: (() => void) | undefined) => void;
85
+ mountUpdateCursorFun: (fun: ((cursorType: string) => void) | undefined) => void;
86
86
  mountKeydownEvent: (fun: ((arg0: any) => void) | undefined) => void;
87
87
  onKeydown: (keyCode: number) => void;
88
88
  setTipCoord: (str: any) => void;
@@ -37,4 +37,5 @@ import MxDrawObject from './MxModule/MxDrawObject';
37
37
  import MxDbDatabase from './MxModule/MxDbDatabase';
38
38
  import MxDbLayerTableRecord from './MxModule/MxDbLayerTableRecord';
39
39
  import MxDbGroup from './MxModule/MxDbGroup';
40
- export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, MxDrawObject, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxDbLayerTableRecord, MxDbGroup };
40
+ import MxCADObject from './MxModule/MxCADObject';
41
+ export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, MxDrawObject, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxCADObject, MxDbLayerTableRecord, MxDbGroup };
@@ -38,8 +38,9 @@ import MxDrawObject from './MxModule/MxDrawObject';
38
38
  import MxDbHatch from './MxModule/MxDbHatch';
39
39
  import MxDbLayerTableRecord from './MxModule/MxDbLayerTableRecord';
40
40
  import MxDbDatabase from './MxModule/MxDbDatabase';
41
+ import MxCADObject from './MxModule/MxCADObject';
41
42
  import MxDbGroup from './MxModule/MxDbGroup';
42
- export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDbHatch, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxDrawObject, MxType, MxDbArea, MxDbLeadTag, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxDbLayerTableRecord, MxDbGroup };
43
+ export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDbHatch, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxDrawObject, MxType, MxDbArea, MxDbLeadTag, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxCADObject, MxDbLayerTableRecord, MxDbGroup };
43
44
  declare const _default: {
44
45
  MxFun: import("./doc").MxFun;
45
46
  Mxassembly: import("./MxModule/Mxassembly/Mxassembly").default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.54",
3
+ "version": "0.1.57",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",