mxdraw 0.1.14 → 0.1.17

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.
@@ -32,6 +32,12 @@ export default abstract class MxDbEntity {
32
32
  * visible 该矩形对象是否可见
33
33
  * */
34
34
  visible: boolean;
35
+ /**
36
+ * visible 用户自定义数据.
37
+ * */
38
+ userData: {
39
+ [key: string]: any;
40
+ };
35
41
  /**
36
42
  * 自定义对象的绘制函数。在方法中定义如何绘制图形
37
43
  * @param pWorldDraw 绘制对象{@link McGiWorldDraw }
@@ -595,4 +595,15 @@ export default class MxDrawObject {
595
595
  * ```
596
596
  */
597
597
  getViewCenterDocCoord(): THREE.Vector3;
598
+ /**
599
+ * 画布大小,自动修改到它父亲div大小。
600
+ * @param
601
+ * @returns
602
+ * @example
603
+ * ```typescript
604
+ *
605
+ *
606
+ * ```
607
+ */
608
+ updateCanvasSize(): void;
598
609
  }
@@ -490,6 +490,11 @@ export default class MxFun {
490
490
  * @param msCmdText 用户输入的数据 input输入框输入的文本信息
491
491
  * @param keyCode 按键Code input输入框的onKeydown事件的event事件对象的keyCode属性
492
492
  * */
493
- setCommandLineInputData(msCmdText: string, keyCode: string): void;
493
+ setCommandLineInputData(msCmdText: string, keyCode: number): void;
494
+ /**
495
+ * 监听指针(鼠标光标)移动变化的坐标信息
496
+ * @parma callback 回调函数中返回坐标信息
497
+ * */
498
+ listenForCoordTip(callback: (coordTip: string) => {}): void;
494
499
  }
495
500
  export {};
@@ -61,7 +61,7 @@ declare class MxDynamicInput {
61
61
  } | undefined;
62
62
  }
63
63
  export declare class MxVueInterface {
64
- mSetCoordFun: ((arg0: any) => void) | undefined;
64
+ mSetCoordFun: ((coordTip: string) => {}) | undefined;
65
65
  mUpdateCursorFun: (() => void) | undefined;
66
66
  mOnKeydownEvent: ((arg0: any) => void) | undefined;
67
67
  mCursorType: string;
@@ -81,10 +81,10 @@ export declare class MxVueInterface {
81
81
  mTitleButtonBarData: any;
82
82
  mLayerComboxData: any;
83
83
  mColorComboxData: any;
84
- mountSetCoordFun: (fun: ((arg0: any) => void) | undefined) => void;
84
+ mountSetCoordFun: (fun: ((coordTip: string) => {}) | undefined) => void;
85
85
  mountUpdateCursorFun: (fun: (() => void) | undefined) => void;
86
86
  mountKeydownEvent: (fun: ((arg0: any) => void) | undefined) => void;
87
- onKeydown: (keyCode: any) => void;
87
+ onKeydown: (keyCode: number) => void;
88
88
  setTipCoord: (str: any) => void;
89
89
  getCursorType: () => string;
90
90
  setCursorType: (curtype: string) => void;
@@ -56,4 +56,5 @@ export interface MxDrawObjectType {
56
56
  eraseAllMxEntity(): void;
57
57
  makeCurrent(): void;
58
58
  getViewCenterDocCoord(): THREE.Vector3;
59
+ updateCanvasSize(): void;
59
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.14",
3
+ "version": "0.1.17",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",