mxdraw 0.1.7 → 0.1.8

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.
@@ -1,2 +1,2 @@
1
- import McGiWorldDraw from "./McGiWorldDraw";
1
+ import McGiWorldDraw from './McGiWorldDraw';
2
2
  export default McGiWorldDraw;
@@ -1,2 +1,2 @@
1
- import McGiWorldDrawType from "./McGiWorldDrawType";
1
+ import McGiWorldDrawType from './McGiWorldDrawType';
2
2
  export default McGiWorldDrawType;
@@ -6,7 +6,6 @@ import McGiWorldDraw from '../McGiWorldDraw';
6
6
  * MxRectEntity 矩形对象.
7
7
  */
8
8
  export default class MxDbRect extends MxDbEntity {
9
- private cornerRadius;
10
9
  /**
11
10
  * pt1: 构成矩形的第一个点
12
11
  * */
@@ -23,6 +22,14 @@ export default class MxDbRect extends MxDbEntity {
23
22
  * height: 在绘制时自动计算矩形像素高度 单位px
24
23
  * */
25
24
  height: number;
25
+ /**
26
+ * cornerRadius(优先级大于radius属性): 圆角的半径 如[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4
27
+ * */
28
+ cornerRadius: number[];
29
+ /**
30
+ * radius(优先级低于cornerRadius属性): 所有圆角统一半径 (radius = 4) 通过MxFun.screenCoordLong2Doc方法转换为 (cornerRadius = [MxFun.screenCoordLong2Doc(4)...])
31
+ * */
32
+ radius: number | undefined;
26
33
  /**
27
34
  * fillColor(优先级低于fillImageSrc属性): 设置颜色后 矩形线框会填充为带颜色的矩形
28
35
  * */
@@ -61,12 +68,7 @@ export default class MxDbRect extends MxDbEntity {
61
68
  moveGripPointsAt(index: number, offset: Vector3): boolean;
62
69
  dwgIn(obj: any): boolean;
63
70
  dwgOut(obj: any): object;
64
- create(): MxDbRect;
71
+ create(): MxDbEntity;
65
72
  transformBy(mat: Matrix4): void;
66
- /**
67
- * setRadius 设置圆角 圆角的半径 如[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4
68
- * @param { number | number[] } radius 圆角半径 为数组时[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4; 或者直接设置半径值 则四个角统一半径
69
- * */
70
- setRadius(radius: number | number[]): void;
71
73
  getTypeName(): string;
72
74
  }
@@ -24,11 +24,11 @@ export interface MxCADObject {
24
24
  * */
25
25
  saveFile(file: string, retfun?: (ret: Object) => void): void;
26
26
  /**
27
- * 获取打开的文件名称
28
- * @param file 文件路径
29
- * @param retfun 保存文件后的回调函数
30
- *
31
- * */
27
+ * 获取打开的文件名称
28
+ * @param file 文件路径
29
+ * @param retfun 保存文件后的回调函数
30
+ *
31
+ * */
32
32
  getFileName(): string;
33
33
  /**
34
34
  * 获取全部图层数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",