vislite 0.4.1-beta.1 → 0.4.1
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/CHANGELOG +4 -1
- package/lib/Buffer/index.umd.js +2 -2
- package/lib/Buffer/index.umd.min.js +2 -2
- package/lib/Canvas/index.umd.js +2 -2
- package/lib/Canvas/index.umd.min.js +2 -2
- package/lib/Cardinal/index.umd.js +2 -2
- package/lib/Cardinal/index.umd.min.js +2 -2
- package/lib/Eoap/index.umd.js +2 -2
- package/lib/Eoap/index.umd.min.js +2 -2
- package/lib/Hermite/index.umd.js +2 -2
- package/lib/Hermite/index.umd.min.js +2 -2
- package/lib/Matrix4/index.umd.js +2 -2
- package/lib/Matrix4/index.umd.min.js +2 -2
- package/lib/Mercator/index.umd.js +2 -2
- package/lib/Mercator/index.umd.min.js +2 -2
- package/lib/OralCanvas/index.es.js +2 -2
- package/lib/OralCanvas/index.es.min.js +2 -2
- package/lib/OralWebGL/index.es.js +2 -2
- package/lib/OralWebGL/index.es.min.js +2 -2
- package/lib/SVG/index.umd.js +6 -6
- package/lib/SVG/index.umd.min.js +3 -3
- package/lib/Shader/index.umd.js +2 -2
- package/lib/Shader/index.umd.min.js +2 -2
- package/lib/Texture/index.umd.js +2 -2
- package/lib/Texture/index.umd.min.js +2 -2
- package/lib/TreeLayout/index.umd.js +2 -2
- package/lib/TreeLayout/index.umd.min.js +2 -2
- package/lib/WebGL/index.umd.js +2 -2
- package/lib/WebGL/index.umd.min.js +2 -2
- package/lib/animation/index.umd.js +2 -2
- package/lib/animation/index.umd.min.js +2 -2
- package/lib/formatColor/index.umd.js +2 -2
- package/lib/formatColor/index.umd.min.js +2 -2
- package/lib/getLoopColors/index.umd.js +2 -2
- package/lib/getLoopColors/index.umd.min.js +2 -2
- package/lib/getWebGLContext/index.umd.js +2 -2
- package/lib/getWebGLContext/index.umd.min.js +2 -2
- package/lib/index.umd.js +6 -6
- package/lib/index.umd.min.js +3 -3
- package/lib/resizeObserver/index.umd.js +2 -2
- package/lib/resizeObserver/index.umd.min.js +2 -2
- package/lib/rotate/index.umd.js +2 -2
- package/lib/rotate/index.umd.min.js +2 -2
- package/lib/ruler/index.umd.js +2 -2
- package/lib/ruler/index.umd.min.js +2 -2
- package/lib/throttle/index.umd.js +2 -2
- package/lib/throttle/index.umd.min.js +2 -2
- package/lib/viewHandler/index.umd.js +2 -2
- package/lib/viewHandler/index.umd.min.js +2 -2
- package/package.json +1 -2
- package/src/common/canvas/painter.ts +4 -2
- package/src/common/svg/index.ts +316 -315
- package/src/throttle.ts +1 -1
- package/types/CanvasConfig.d.ts +6 -4
- package/types/Object3D.d.ts +4 -3
- package/types/SVGConfig.d.ts +6 -4
- package/types/Tree.d.ts +32 -0
- package/types/TreeOption.d.ts +5 -2
- package/types/painterConfig.d.ts +3 -0
- package/types/ruler.d.ts +1 -1
- package/types/throttleOption.d.ts +4 -2
package/types/CanvasConfig.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { arcCapType, textAlignType, textBaselineType } from './painterConfig'
|
|
2
|
+
|
|
1
3
|
export default interface CanvasConfigType {
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -18,12 +20,12 @@ export default interface CanvasConfigType {
|
|
|
18
20
|
/**
|
|
19
21
|
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
20
22
|
*/
|
|
21
|
-
textAlign?:
|
|
23
|
+
textAlign?: textAlignType
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
25
27
|
*/
|
|
26
|
-
textBaseline?:
|
|
28
|
+
textBaseline?: textBaselineType
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
31
|
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
@@ -69,13 +71,13 @@ export default interface CanvasConfigType {
|
|
|
69
71
|
/**
|
|
70
72
|
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
71
73
|
*/
|
|
72
|
-
"arcStartCap"?:
|
|
74
|
+
"arcStartCap"?: arcCapType
|
|
73
75
|
"arc-start-cap"?: string // 向下兼容
|
|
74
76
|
|
|
75
77
|
/**
|
|
76
78
|
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
77
79
|
*/
|
|
78
|
-
"arcEndCap"?:
|
|
80
|
+
"arcEndCap"?: arcCapType
|
|
79
81
|
"arc-end-cap"?: string // 向下兼容
|
|
80
82
|
|
|
81
83
|
}
|
package/types/Object3D.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Matrix4Type from './Matrix4'
|
|
2
2
|
|
|
3
|
+
export type geometryType = "LINES" | "INE_STRIP" | "LINE_LOOP" | "TRIANGLES" | "TRIANGLE_STRIP" | "TRIANGLE_FAN"
|
|
4
|
+
|
|
3
5
|
export interface meshType {
|
|
4
6
|
|
|
5
7
|
// 形状
|
|
@@ -36,9 +38,8 @@ export interface meshType {
|
|
|
36
38
|
itemSize: number
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
type: string
|
|
41
|
+
// 线、还是三角形
|
|
42
|
+
type: geometryType
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
// 材质
|
package/types/SVGConfig.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { arcCapType, textAlignType, textBaselineType } from './painterConfig'
|
|
2
|
+
|
|
1
3
|
export default interface SVGConfigType {
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -18,12 +20,12 @@ export default interface SVGConfigType {
|
|
|
18
20
|
/**
|
|
19
21
|
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
20
22
|
*/
|
|
21
|
-
textAlign?:
|
|
23
|
+
textAlign?: textAlignType
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
25
27
|
*/
|
|
26
|
-
textBaseline?:
|
|
28
|
+
textBaseline?: textBaselineType
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
31
|
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
@@ -47,13 +49,13 @@ export default interface SVGConfigType {
|
|
|
47
49
|
/**
|
|
48
50
|
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
49
51
|
*/
|
|
50
|
-
"arcStartCap"?:
|
|
52
|
+
"arcStartCap"?: arcCapType
|
|
51
53
|
"arc-start-cap"?: string // 向下兼容
|
|
52
54
|
|
|
53
55
|
/**
|
|
54
56
|
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
55
57
|
*/
|
|
56
|
-
"arcEndCap"?:
|
|
58
|
+
"arcEndCap"?: arcCapType
|
|
57
59
|
"arc-end-cap"?: string // 向下兼容
|
|
58
60
|
|
|
59
61
|
}
|
package/types/Tree.d.ts
CHANGED
|
@@ -7,13 +7,45 @@ export interface TreeResultType {
|
|
|
7
7
|
|
|
8
8
|
node: {
|
|
9
9
|
[id: string]: {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 当前结点的孩子的结点id集合
|
|
13
|
+
*/
|
|
10
14
|
children: Array<string>
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 当前结点的原始数据
|
|
18
|
+
*/
|
|
11
19
|
data: any
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 当前结点的id
|
|
23
|
+
*/
|
|
12
24
|
id: string
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 当前结点的父结点id
|
|
28
|
+
*/
|
|
13
29
|
pid: string
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 当前结点的横坐标
|
|
33
|
+
*/
|
|
14
34
|
left: number
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 当前结点的纵坐标
|
|
38
|
+
*/
|
|
15
39
|
top: number,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 当前结点的打开还是关闭
|
|
43
|
+
*/
|
|
16
44
|
isOpen: boolean,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 当前结点本身是否显示
|
|
48
|
+
*/
|
|
17
49
|
show: boolean
|
|
18
50
|
}
|
|
19
51
|
}
|
package/types/TreeOption.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export type treeType = "plain" | "rect" | "circle"
|
|
2
|
+
export type treeDirectionType = "LR" | "RL" | "TB" | "BT"
|
|
3
|
+
|
|
1
4
|
export default interface TreeOptionType {
|
|
2
5
|
|
|
3
6
|
offsetX?: number
|
|
@@ -6,12 +9,12 @@ export default interface TreeOptionType {
|
|
|
6
9
|
/**
|
|
7
10
|
* 树图类型
|
|
8
11
|
*/
|
|
9
|
-
type?:
|
|
12
|
+
type?: treeType
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* 设置成矩形树图(rect)时有效,表示树图方向
|
|
13
16
|
*/
|
|
14
|
-
direction?:
|
|
17
|
+
direction?: treeDirectionType
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* 树图x坐标
|
package/types/ruler.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type throttleOpportunityType = "begin" | "end" | "wide"
|
|
2
|
+
|
|
1
3
|
export default interface throttleOptionType {
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -12,9 +14,9 @@ export default interface throttleOptionType {
|
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
16
|
* 执行时机
|
|
15
|
-
*
|
|
17
|
+
*
|
|
16
18
|
* begin(开始触发)、end(结束触发)、wide(第一次开始触发,其余结束触发)
|
|
17
19
|
*/
|
|
18
|
-
opportunity?:
|
|
20
|
+
opportunity?: throttleOpportunityType
|
|
19
21
|
|
|
20
22
|
}
|