mxdraw 0.1.13 → 0.1.16
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/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -1
- package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +1 -1
- package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +1 -1
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/mxdraw.es5.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +6 -0
- package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +1 -1
- package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +24 -0
- package/dist/types/types/MxDrawObject.d.ts +2 -0
- package/package.json +2 -1
|
@@ -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 }
|
|
@@ -23,7 +23,7 @@ export default class MxDbSVG extends MxDbEntity {
|
|
|
23
23
|
useSvgColor: boolean;
|
|
24
24
|
private calcVewSize;
|
|
25
25
|
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
26
|
-
setSvgPath(path: string): void
|
|
26
|
+
setSvgPath(path: string, preload?: boolean): Promise<void>;
|
|
27
27
|
getSvgPath(): string;
|
|
28
28
|
setSvgPostion(pos: THREE.Vector3): void;
|
|
29
29
|
getSvgPostion(): THREE.Vector3;
|
|
@@ -227,6 +227,8 @@ export default class MxDrawObject {
|
|
|
227
227
|
* ```typescript
|
|
228
228
|
* Mx.MxFun.getCurrentDraw().addEvent("addResizeEvent", ()=> {})
|
|
229
229
|
* Mx.MxFun.getCurrentDraw().addEvent("viewchange", ()=> {})
|
|
230
|
+
* 图纸加载完成
|
|
231
|
+
* Mx.MxFun.getCurrentDraw().addEvent("loadComplete", ()=> {})
|
|
230
232
|
* 视区重绘事件.
|
|
231
233
|
* Mx.MxFun.getCurrentDraw().addEvent("render", (renderer)=> {})
|
|
232
234
|
* 视区大小被修改事件.,viewsize={viewWidth:viewWidth,viewHeight:viewHeight}
|
|
@@ -582,4 +584,26 @@ export default class MxDrawObject {
|
|
|
582
584
|
* ```
|
|
583
585
|
*/
|
|
584
586
|
makeCurrent(): void;
|
|
587
|
+
/**
|
|
588
|
+
* 得到视区中心的文档坐标.
|
|
589
|
+
* @param
|
|
590
|
+
* @returns
|
|
591
|
+
* @example
|
|
592
|
+
* ```typescript
|
|
593
|
+
*
|
|
594
|
+
*
|
|
595
|
+
* ```
|
|
596
|
+
*/
|
|
597
|
+
getViewCenterDocCoord(): THREE.Vector3;
|
|
598
|
+
/**
|
|
599
|
+
* 画布大小,自动修改到它父亲div大小。
|
|
600
|
+
* @param
|
|
601
|
+
* @returns
|
|
602
|
+
* @example
|
|
603
|
+
* ```typescript
|
|
604
|
+
*
|
|
605
|
+
*
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
updateCanvasSize(): void;
|
|
585
609
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mxdraw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/mxdraw.umd.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
|
|
26
26
|
"prebuild": "rimraf dist",
|
|
27
27
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts && typedoc --out docs && node compress",
|
|
28
|
+
"builddebug": "tsc --module commonjs && rollup -c rollup.config.ts && typedoc --out docs",
|
|
28
29
|
"oldDocs": "typedoc --out docs --target es6 --theme minimal --mode file src",
|
|
29
30
|
"docs": "npm run patch && npm run doctoc && typedoc --out docs",
|
|
30
31
|
"start": "rollup -c rollup.config.ts -w",
|