ice-render 0.0.45 → 0.0.46
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/types/graphic/ICEComponent.d.ts +7 -3
- package/dist/types/graphic/ICEDotPath.d.ts +8 -4
- package/dist/types/graphic/link/ICEPolyLine.d.ts +7 -6
- package/dist/types/graphic/shape/ICEIsogon.d.ts +6 -3
- package/dist/types/graphic/shape/ICERose.d.ts +6 -3
- package/dist/types/graphic/shape/ICEStar.d.ts +6 -3
- package/dist/types/graphic/text/ICEText.d.ts +7 -3
- package/package.json +1 -1
|
@@ -103,9 +103,13 @@ declare abstract class ICEComponent extends ICEEventTarget {
|
|
|
103
103
|
render(): void;
|
|
104
104
|
protected applyStyleToCtx(): void;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
106
|
+
* @method calcComponentParams
|
|
107
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
108
|
+
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
109
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
110
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
111
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
112
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
109
113
|
* @returns
|
|
110
114
|
*/
|
|
111
115
|
protected calcComponentParams(): {
|
|
@@ -18,10 +18,14 @@ export default abstract class ICEDotPath extends ICEPath {
|
|
|
18
18
|
*/
|
|
19
19
|
constructor(props: any);
|
|
20
20
|
/**
|
|
21
|
-
* 计算原始的宽高、位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
22
|
-
* 由于点状路径可能是不规则的形状,所以宽高需要手动计算,特殊形状的子类需要覆盖此方法提供自己的实现。
|
|
23
|
-
* 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
24
21
|
* @overwrite
|
|
22
|
+
* @method calcComponentParams
|
|
23
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
24
|
+
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
25
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
26
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
27
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
28
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
25
29
|
* @returns
|
|
26
30
|
*/
|
|
27
31
|
protected calcComponentParams(): {
|
|
@@ -42,7 +46,7 @@ export default abstract class ICEDotPath extends ICEPath {
|
|
|
42
46
|
* 计算路径上的关键点:
|
|
43
47
|
* - 默认的坐标原点是 (0,0) 位置。
|
|
44
48
|
* - 这些点没有经过 transform 矩阵变换。
|
|
45
|
-
* this.calcComponentParams()
|
|
49
|
+
* - this.calcComponentParams() 会依赖此方法来计算位置和尺寸,此时还没有确定原点坐标,所以 calcDots() 方法内部不能依赖原点坐标,只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
46
50
|
* @returns
|
|
47
51
|
*/
|
|
48
52
|
protected calcDots(): any;
|
|
@@ -124,14 +124,15 @@ declare class ICEPolyLine extends ICEDotPath {
|
|
|
124
124
|
*/
|
|
125
125
|
rmDot(index: number): boolean;
|
|
126
126
|
/**
|
|
127
|
+
* @overwrite
|
|
127
128
|
* @method calcComponentParams
|
|
128
|
-
*
|
|
129
|
-
* - 计算原始的宽高、位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
130
|
-
* - 由于点状路径可能是不规则的形状,所以宽高需要手动计算,特殊形状的子类需要覆盖此方法提供自己的实现。
|
|
129
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
131
130
|
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
131
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
132
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
133
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
134
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
135
|
+
* @returns
|
|
135
136
|
*/
|
|
136
137
|
protected calcComponentParams(): {
|
|
137
138
|
width: any;
|
|
@@ -28,9 +28,12 @@ declare class ICEIsogon extends ICEDotPath {
|
|
|
28
28
|
/**
|
|
29
29
|
* @overwrite
|
|
30
30
|
* @method calcComponentParams
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
32
|
+
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
33
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
34
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
35
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
36
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
34
37
|
* @returns
|
|
35
38
|
*/
|
|
36
39
|
protected calcComponentParams(): {
|
|
@@ -15,9 +15,12 @@ declare class ICERose extends ICEDotPath {
|
|
|
15
15
|
/**
|
|
16
16
|
* @overwrite
|
|
17
17
|
* @method calcComponentParams
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
19
|
+
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
20
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
21
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
22
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
23
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
21
24
|
* @returns
|
|
22
25
|
*/
|
|
23
26
|
protected calcComponentParams(): {
|
|
@@ -22,9 +22,12 @@ declare class ICEStar extends ICEDotPath {
|
|
|
22
22
|
/**
|
|
23
23
|
* @overwrite
|
|
24
24
|
* @method calcComponentParams
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
26
|
+
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
27
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
28
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
29
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
30
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
28
31
|
* @returns
|
|
29
32
|
*/
|
|
30
33
|
protected calcComponentParams(): {
|
|
@@ -28,9 +28,13 @@ declare class ICEText extends ICEComponent {
|
|
|
28
28
|
protected static arrangeParam(props: any): any;
|
|
29
29
|
/**
|
|
30
30
|
* @overwrite
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
31
|
+
* @method calcComponentParams
|
|
32
|
+
* - 计算组件最原始的宽高和位置,此时没有经过任何变换,也没有移动坐标原点。
|
|
33
|
+
* - 在计算组件的原始尺寸时还没有确定原点坐标,所以只能基于组件本地坐标系的左上角 (0,0) 点进行计算。
|
|
34
|
+
* - 此方法不能依赖原点位置和 transform 矩阵。
|
|
35
|
+
* - 此方法会在 render() 中调用,所以不需要在构造函数中调用。
|
|
36
|
+
* - 此方法中不能使用 setState() ,如果需要修改状态,直接赋值,如:this.state.width = 100;
|
|
37
|
+
* - 子类可以覆盖此方法,实现自己的计算逻辑。
|
|
34
38
|
* @returns
|
|
35
39
|
*/
|
|
36
40
|
protected calcComponentParams(): {
|
package/package.json
CHANGED