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.
Files changed (61) hide show
  1. package/CHANGELOG +4 -1
  2. package/lib/Buffer/index.umd.js +2 -2
  3. package/lib/Buffer/index.umd.min.js +2 -2
  4. package/lib/Canvas/index.umd.js +2 -2
  5. package/lib/Canvas/index.umd.min.js +2 -2
  6. package/lib/Cardinal/index.umd.js +2 -2
  7. package/lib/Cardinal/index.umd.min.js +2 -2
  8. package/lib/Eoap/index.umd.js +2 -2
  9. package/lib/Eoap/index.umd.min.js +2 -2
  10. package/lib/Hermite/index.umd.js +2 -2
  11. package/lib/Hermite/index.umd.min.js +2 -2
  12. package/lib/Matrix4/index.umd.js +2 -2
  13. package/lib/Matrix4/index.umd.min.js +2 -2
  14. package/lib/Mercator/index.umd.js +2 -2
  15. package/lib/Mercator/index.umd.min.js +2 -2
  16. package/lib/OralCanvas/index.es.js +2 -2
  17. package/lib/OralCanvas/index.es.min.js +2 -2
  18. package/lib/OralWebGL/index.es.js +2 -2
  19. package/lib/OralWebGL/index.es.min.js +2 -2
  20. package/lib/SVG/index.umd.js +6 -6
  21. package/lib/SVG/index.umd.min.js +3 -3
  22. package/lib/Shader/index.umd.js +2 -2
  23. package/lib/Shader/index.umd.min.js +2 -2
  24. package/lib/Texture/index.umd.js +2 -2
  25. package/lib/Texture/index.umd.min.js +2 -2
  26. package/lib/TreeLayout/index.umd.js +2 -2
  27. package/lib/TreeLayout/index.umd.min.js +2 -2
  28. package/lib/WebGL/index.umd.js +2 -2
  29. package/lib/WebGL/index.umd.min.js +2 -2
  30. package/lib/animation/index.umd.js +2 -2
  31. package/lib/animation/index.umd.min.js +2 -2
  32. package/lib/formatColor/index.umd.js +2 -2
  33. package/lib/formatColor/index.umd.min.js +2 -2
  34. package/lib/getLoopColors/index.umd.js +2 -2
  35. package/lib/getLoopColors/index.umd.min.js +2 -2
  36. package/lib/getWebGLContext/index.umd.js +2 -2
  37. package/lib/getWebGLContext/index.umd.min.js +2 -2
  38. package/lib/index.umd.js +6 -6
  39. package/lib/index.umd.min.js +3 -3
  40. package/lib/resizeObserver/index.umd.js +2 -2
  41. package/lib/resizeObserver/index.umd.min.js +2 -2
  42. package/lib/rotate/index.umd.js +2 -2
  43. package/lib/rotate/index.umd.min.js +2 -2
  44. package/lib/ruler/index.umd.js +2 -2
  45. package/lib/ruler/index.umd.min.js +2 -2
  46. package/lib/throttle/index.umd.js +2 -2
  47. package/lib/throttle/index.umd.min.js +2 -2
  48. package/lib/viewHandler/index.umd.js +2 -2
  49. package/lib/viewHandler/index.umd.min.js +2 -2
  50. package/package.json +1 -2
  51. package/src/common/canvas/painter.ts +4 -2
  52. package/src/common/svg/index.ts +316 -315
  53. package/src/throttle.ts +1 -1
  54. package/types/CanvasConfig.d.ts +6 -4
  55. package/types/Object3D.d.ts +4 -3
  56. package/types/SVGConfig.d.ts +6 -4
  57. package/types/Tree.d.ts +32 -0
  58. package/types/TreeOption.d.ts +5 -2
  59. package/types/painterConfig.d.ts +3 -0
  60. package/types/ruler.d.ts +1 -1
  61. package/types/throttleOption.d.ts +4 -2
@@ -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?: string
23
+ textAlign?: textAlignType
22
24
 
23
25
  /**
24
26
  * 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
25
27
  */
26
- textBaseline?: string
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"?: string
74
+ "arcStartCap"?: arcCapType
73
75
  "arc-start-cap"?: string // 向下兼容
74
76
 
75
77
  /**
76
78
  * 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
77
79
  */
78
- "arcEndCap"?: string
80
+ "arcEndCap"?: arcCapType
79
81
  "arc-end-cap"?: string // 向下兼容
80
82
 
81
83
  }
@@ -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
- // "POINTS" | "LINES" | "INE_STRIP" | "LINE_LOOP" | "TRIANGLES" | "TRIANGLE_STRIP" | "TRIANGLE_FAN"
41
- type: string
41
+ // 线、还是三角形
42
+ type: geometryType
42
43
  }
43
44
 
44
45
  // 材质
@@ -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?: string
23
+ textAlign?: textAlignType
22
24
 
23
25
  /**
24
26
  * 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
25
27
  */
26
- textBaseline?: string
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"?: string
52
+ "arcStartCap"?: arcCapType
51
53
  "arc-start-cap"?: string // 向下兼容
52
54
 
53
55
  /**
54
56
  * 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
55
57
  */
56
- "arcEndCap"?: string
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
  }
@@ -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?: string
12
+ type?: treeType
10
13
 
11
14
  /**
12
15
  * 设置成矩形树图(rect)时有效,表示树图方向
13
16
  */
14
- direction?: string
17
+ direction?: treeDirectionType
15
18
 
16
19
  /**
17
20
  * 树图x坐标
@@ -0,0 +1,3 @@
1
+ export type arcCapType = "butt" | "round" | "-round"
2
+ export type textAlignType = "left" | "center" | "right"
3
+ export type textBaselineType = "top" | "middle" | "bottom"
package/types/ruler.d.ts CHANGED
@@ -4,5 +4,5 @@ export interface rulerOptionType {
4
4
  }
5
5
 
6
6
  export default interface rulerType {
7
- (maxValue: number, minValue: number, num: number, option: rulerOptionType): number[]
7
+ (maxValue: number, minValue: number, num: number, option?: rulerOptionType): number[]
8
8
  }
@@ -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?: string
20
+ opportunity?: throttleOpportunityType
19
21
 
20
22
  }