mxdraw 0.1.34 → 0.1.37

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,51 @@
1
+ /** @module MxDbDatabase */
2
+ import MxDbEntity from '../MxDbEntity';
3
+ import MxDbLayerTableRecord from '../MxDbLayerTableRecord';
4
+ /**
5
+ * MxDbDatabase 当前数据库对象.
6
+ *
7
+ */
8
+ export default class MxDbDatabase {
9
+ private _mxDatabase;
10
+ constructor(mxDatabase: any);
11
+ /**
12
+ * 添加图层.
13
+ * @example
14
+ * ```typescript
15
+ *
16
+ * ```
17
+ */
18
+ addLayer(layer: string): MxDbLayerTableRecord;
19
+ /**
20
+ * 显示或隐藏图层
21
+ * @example
22
+ * ```typescript
23
+ *
24
+ * ```
25
+ */
26
+ showLayer(layer: string, isVisible: boolean): void;
27
+ /**
28
+ * 设置当前图层
29
+ * @example
30
+ * ```typescript
31
+ *
32
+ * ```
33
+ */
34
+ setCurrentLayer(layer: string): MxDbLayerTableRecord;
35
+ /**
36
+ * 得到图层对象.
37
+ * @example
38
+ * ```typescript
39
+ *
40
+ * ```
41
+ */
42
+ getLayer(layer: string): MxDbLayerTableRecord;
43
+ /**
44
+ * 添加对象到当前数据库.
45
+ * @example
46
+ * ```typescript
47
+ *
48
+ * ```
49
+ */
50
+ addEntity(ent: MxDbEntity): number;
51
+ }
@@ -0,0 +1,3 @@
1
+ /** @module MxDrawObject */
2
+ import MxDbDatabase from './MxDbDatabase';
3
+ export default MxDbDatabase;
@@ -48,6 +48,7 @@ export default abstract class MxDbEntity {
48
48
  private lineWidthByPixels;
49
49
  private dDashArray;
50
50
  private dDashRatio;
51
+ private layer;
51
52
  /**
52
53
  * 自定义对象的绘制函数。在方法中定义如何绘制图形
53
54
  * @param pWorldDraw 绘制对象{@link McGiWorldDraw }
@@ -171,6 +172,16 @@ export default abstract class MxDbEntity {
171
172
  * @returns boolean
172
173
  */
173
174
  erase(): boolean;
175
+ /**
176
+ * 设置图层
177
+ * @returns boolean
178
+ */
179
+ setLayer(layer: string): void;
180
+ /**
181
+ * 得到图层
182
+ * @returns boolean
183
+ */
184
+ getLayer(): string;
174
185
  /**
175
186
  * 设置颜色
176
187
  * @param color 颜色值
@@ -0,0 +1,10 @@
1
+ /** @module MxDbLayerTableRecord */
2
+ /**
3
+ * MxDbDatabase 当前数据库对象.
4
+ *
5
+ */
6
+ export default interface MxDbLayerTableRecord {
7
+ getName(): string;
8
+ setVisible(visible: boolean): void;
9
+ getVisible(): boolean;
10
+ }
@@ -0,0 +1,3 @@
1
+ /** @module MxDrawObject */
2
+ import MxDbLayerTableRecord from './MxDbLayerTableRecord';
3
+ export default MxDbLayerTableRecord;
@@ -1,4 +1,5 @@
1
1
  /** @module MxDrawObject */
2
+ import MxDbDatabase from '../MxDbDatabase';
2
3
  import MxDbEntity from '../MxDbEntity';
3
4
  export interface MxDrawObjectType {
4
5
  renderer: THREE.WebGLRenderer;
@@ -691,4 +692,12 @@ export default class MxDrawObject {
691
692
  * ```
692
693
  */
693
694
  getOrbitControls(): void;
695
+ /**
696
+ * 得到当前图形数据库对象
697
+ * @example
698
+ * ```typescript
699
+ *
700
+ * ```
701
+ */
702
+ getMxDatabase(): MxDbDatabase;
694
703
  }
@@ -3,6 +3,7 @@ import { MeshLambertMaterial } from 'three';
3
3
  import MxDbEntity from '../MxDbEntity';
4
4
  import mxUiData from '../loadCoreCode/mxUiData';
5
5
  import { MxDrawObjectType } from '../MxDrawObject/MxDrawObject';
6
+ import MxDbDatabase from '../MxDbDatabase';
6
7
  interface CanvasParent extends HTMLElement {
7
8
  tabindex?: number;
8
9
  }
@@ -212,6 +213,14 @@ export default class MxFun {
212
213
  * ```
213
214
  */
214
215
  getCurrentDraw(): MxDrawObject;
216
+ /**
217
+ * 获得到当前数据库对象.
218
+ * @return MxDbDatabase
219
+ * @example
220
+ * ``` typescript
221
+ * ```
222
+ */
223
+ getCurrentDatabase(): MxDbDatabase;
215
224
  /**
216
225
  * 屏幕坐标长度转THREE.JS坐标长度
217
226
  * @param len 屏幕坐标长度
@@ -34,4 +34,6 @@ import MxDbRectBoxLeadComment from './MxModule/MxDbRectBoxLeadComment';
34
34
  import MxDbEllipse from './MxModule/MxDbEllipse';
35
35
  import MxDbText from './MxModule/MxDbText';
36
36
  import MxDrawObject from './MxModule/MxDrawObject';
37
- 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 };
37
+ import MxDbDatabase from './MxModule/MxDbDatabase';
38
+ import MxDbLayerTableRecord from './MxModule/MxDbLayerTableRecord';
39
+ 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 };
@@ -35,7 +35,9 @@ import MxDbEllipse from './MxModule/MxDbEllipse';
35
35
  import MxDbText from './MxModule/MxDbText';
36
36
  import MxDrawObject from './MxModule/MxDrawObject';
37
37
  import MxDbHatch from './MxModule/MxDbHatch';
38
- 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, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon };
38
+ import MxDbLayerTableRecord from './MxModule/MxDbLayerTableRecord';
39
+ import MxDbDatabase from './MxModule/MxDbDatabase';
40
+ 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, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxDbLayerTableRecord };
39
41
  declare const _default: {
40
42
  MxFun: import("./doc").MxFun;
41
43
  Mxassembly: import("./MxModule/Mxassembly/Mxassembly").default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.34",
3
+ "version": "0.1.37",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",