vislite 1.2.0-alpha.2 → 1.2.0-alpha.4
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 +266 -254
- package/lib/Buffer/index.es.js +1 -1
- package/lib/Buffer/index.es.min.js +1 -1
- package/lib/Canvas/index.es.js +16 -5
- package/lib/Canvas/index.es.min.js +2 -2
- package/lib/Cardinal/index.es.js +1 -1
- package/lib/Cardinal/index.es.min.js +1 -1
- package/lib/Eoap/index.es.js +1 -1
- package/lib/Eoap/index.es.min.js +1 -1
- package/lib/Hermite/index.es.js +1 -1
- package/lib/Hermite/index.es.min.js +1 -1
- package/lib/Matrix4/index.es.js +1 -1
- package/lib/Matrix4/index.es.min.js +1 -1
- package/lib/Mercator/index.es.js +1 -1
- package/lib/Mercator/index.es.min.js +1 -1
- package/lib/RawCanvas/index.es.js +15 -4
- package/lib/RawCanvas/index.es.min.js +2 -2
- package/lib/SVG/index.es.js +12 -8
- package/lib/SVG/index.es.min.js +2 -2
- package/lib/Shader/index.es.js +1 -1
- package/lib/Shader/index.es.min.js +1 -1
- package/lib/Texture/index.es.js +1 -1
- package/lib/Texture/index.es.min.js +1 -1
- package/lib/TreeLayout/index.es.js +38 -8
- package/lib/TreeLayout/index.es.min.js +2 -2
- package/lib/animation/index.es.js +38 -8
- package/lib/animation/index.es.min.js +2 -2
- package/lib/assemble/index.es.js +1 -1
- package/lib/assemble/index.es.min.js +1 -1
- package/lib/getLoopColors/index.es.js +1 -1
- package/lib/getLoopColors/index.es.min.js +1 -1
- package/lib/getWebGLContext/index.es.js +1 -1
- package/lib/getWebGLContext/index.es.min.js +1 -1
- package/lib/index.umd.js +88 -36
- package/lib/index.umd.min.js +2 -2
- package/lib/initOption/index.es.js +1 -1
- package/lib/initOption/index.es.min.js +1 -1
- package/lib/mergeOption/index.es.js +1 -1
- package/lib/mergeOption/index.es.min.js +1 -1
- package/lib/move/index.es.js +1 -1
- package/lib/move/index.es.min.js +1 -1
- package/lib/rotate/index.es.js +1 -1
- package/lib/rotate/index.es.min.js +1 -1
- package/lib/ruler/index.es.js +1 -1
- package/lib/ruler/index.es.min.js +1 -1
- package/lib/scale/index.es.js +1 -1
- package/lib/scale/index.es.min.js +1 -1
- package/lib/throttle/index.es.js +25 -25
- package/lib/throttle/index.es.min.js +2 -2
- package/miniprogram/ui-canvas/index.js +115 -115
- package/package/animation/index.ts +1 -1
- package/package/throttle/index.ts +1 -1
- package/package.json +7 -2
- package/src/Canvas.ts +84 -84
- package/src/common/canvas/gradient.ts +32 -24
- package/src/common/canvas/index.ts +182 -177
- package/src/common/canvas/painter.ts +9 -3
- package/src/common/svg/config.ts +194 -190
- package/src/common/svg/index.ts +350 -347
- package/src/common/svg/tool.ts +42 -44
- package/src/layout/TreeLayout.ts +1 -1
- package/types/Canvas.d.ts +10 -1
- package/types/CanvasConfig.d.ts +116 -106
- package/types/SVGConfig.d.ts +89 -79
- package/types/animation.d.ts +2 -6
- package/types/index.d.ts +160 -158
- package/types/painterConfig.d.ts +5 -3
- package/types/throttle.d.ts +2 -4
- package/types/throttleOption.d.ts +1 -22
- package/types/uni-canvas.d.ts +4 -0
- package/src/animation.ts +0 -99
- package/src/throttle.ts +0 -53
package/src/common/svg/tool.ts
CHANGED
|
@@ -1,45 +1,43 @@
|
|
|
1
|
-
import type SVGConfigType from '../../../types/SVGConfig'
|
|
2
|
-
|
|
3
|
-
import { XLINK_ATTRIBUTE } from "./dictionary"
|
|
4
|
-
|
|
5
|
-
// 新建节点
|
|
6
|
-
export function toNode(tagname: string) {
|
|
7
|
-
return document.createElementNS('http://www.w3.org/2000/svg', tagname)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// 设置属性
|
|
11
|
-
const _setAttribute = function (el: SVGElement, key: string, value: string | number) {
|
|
12
|
-
|
|
13
|
-
// 需要使用xlink命名空间的xml属性
|
|
14
|
-
if (XLINK_ATTRIBUTE.indexOf(key) > -1) {
|
|
15
|
-
el.setAttributeNS("http://www.w3.org/1999/xlink", 'xlink:' + key, value + "")
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// 否则
|
|
19
|
-
else {
|
|
20
|
-
el.setAttribute(key, value + "")
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export const setAttribute = _setAttribute
|
|
24
|
-
|
|
25
|
-
// 获取属性
|
|
26
|
-
export function getAttribute(el: SVGElement, key: string) {
|
|
27
|
-
if (XLINK_ATTRIBUTE.indexOf(key) > -1) key = 'xlink:' + key
|
|
28
|
-
return el.getAttribute(key)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function full(el: SVGElement, config: SVGConfigType) {
|
|
32
|
-
_setAttribute(el, "stroke", config.strokeStyle as string)
|
|
33
|
-
_setAttribute(el, "fill", config.fillStyle as string)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_setAttribute(el, "
|
|
43
|
-
_setAttribute(el, "fill", "none")
|
|
44
|
-
_setAttribute(el, "stroke-dasharray", (config.lineDash as Array<number>).join(','))
|
|
1
|
+
import type SVGConfigType from '../../../types/SVGConfig'
|
|
2
|
+
|
|
3
|
+
import { XLINK_ATTRIBUTE } from "./dictionary"
|
|
4
|
+
|
|
5
|
+
// 新建节点
|
|
6
|
+
export function toNode(tagname: string) {
|
|
7
|
+
return document.createElementNS('http://www.w3.org/2000/svg', tagname)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 设置属性
|
|
11
|
+
const _setAttribute = function (el: SVGElement, key: string, value: string | number) {
|
|
12
|
+
|
|
13
|
+
// 需要使用xlink命名空间的xml属性
|
|
14
|
+
if (XLINK_ATTRIBUTE.indexOf(key) > -1) {
|
|
15
|
+
el.setAttributeNS("http://www.w3.org/1999/xlink", 'xlink:' + key, value + "")
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 否则
|
|
19
|
+
else {
|
|
20
|
+
el.setAttribute(key, value + "")
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export const setAttribute = _setAttribute
|
|
24
|
+
|
|
25
|
+
// 获取属性
|
|
26
|
+
export function getAttribute(el: SVGElement, key: string) {
|
|
27
|
+
if (XLINK_ATTRIBUTE.indexOf(key) > -1) key = 'xlink:' + key
|
|
28
|
+
return el.getAttribute(key)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function full(el: SVGElement, config: SVGConfigType) {
|
|
32
|
+
_setAttribute(el, "stroke", config.strokeStyle as string)
|
|
33
|
+
_setAttribute(el, "fill", config.fillStyle as string)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function fill(el: SVGElement, config: SVGConfigType) {
|
|
37
|
+
_setAttribute(el, "fill", config.fillStyle as string)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function stroke(el: SVGElement, config: SVGConfigType) {
|
|
41
|
+
_setAttribute(el, "stroke", config.strokeStyle as string)
|
|
42
|
+
_setAttribute(el, "fill", "none")
|
|
45
43
|
}
|
package/src/layout/TreeLayout.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type TreeOptionType from '../../types/TreeOption'
|
|
|
4
4
|
|
|
5
5
|
import Tree from '../common/tree/index'
|
|
6
6
|
import { initOption } from '../common/option'
|
|
7
|
-
import animation from
|
|
7
|
+
import { animation } from "@oipage/core.js/src/animation/index"
|
|
8
8
|
import rotate from '../rotate'
|
|
9
9
|
|
|
10
10
|
class TreeLayout extends Tree implements TreeLayoutType {
|
package/types/Canvas.d.ts
CHANGED
|
@@ -297,6 +297,15 @@ export default interface CanvasType {
|
|
|
297
297
|
*/
|
|
298
298
|
createRadialGradient(cx: number, cy: number, r: number): GradientType<CanvasGradient>
|
|
299
299
|
|
|
300
|
+
/**
|
|
301
|
+
* 创建角度渐变
|
|
302
|
+
* @param cx 中心
|
|
303
|
+
* @param cy
|
|
304
|
+
* @param beginDeg 开始弧度
|
|
305
|
+
* @param deg 跨越弧度,可选,默认2PI
|
|
306
|
+
*/
|
|
307
|
+
createConicGradient(cx: number, cy: number, beginDeg: number, deg?: number): GradientType<CanvasGradient>
|
|
308
|
+
|
|
300
309
|
/**
|
|
301
310
|
* 获取指定位置颜色
|
|
302
311
|
* @param x
|
|
@@ -326,5 +335,5 @@ export default interface CanvasType {
|
|
|
326
335
|
* @param eventName 事件名称
|
|
327
336
|
* @param callback 回调函数
|
|
328
337
|
*/
|
|
329
|
-
bind(eventName: string, callback: (regionName: string) => void): this
|
|
338
|
+
bind(eventName: string, callback: (regionName: string, x: number, y: number) => void): this
|
|
330
339
|
}
|
package/types/CanvasConfig.d.ts
CHANGED
|
@@ -1,107 +1,117 @@
|
|
|
1
|
-
import { arcCapType, textAlignType, textBaselineType } from './painterConfig'
|
|
2
|
-
|
|
3
|
-
export default interface CanvasConfigType {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 填充色或图案,默认"#000"
|
|
7
|
-
*/
|
|
8
|
-
fillStyle?: string | CanvasGradient
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 轮廓色或图案,默认"#000"
|
|
12
|
-
*/
|
|
13
|
-
strokeStyle?: string | CanvasGradient
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 线条宽度,默认1(单位px)
|
|
17
|
-
*/
|
|
18
|
-
lineWidth?: number
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
32
|
-
*
|
|
33
|
-
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
34
|
-
*/
|
|
35
|
-
lineDash?: Array<number>
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 已废弃,向下兼容,请用
|
|
64
|
-
*/
|
|
65
|
-
"font-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* 已废弃,向下兼容,请用
|
|
74
|
-
*/
|
|
75
|
-
"font-
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* 已废弃,向下兼容,请用
|
|
84
|
-
*/
|
|
85
|
-
"font-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* 已废弃,向下兼容,请用
|
|
94
|
-
*/
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* 已废弃,向下兼容,请用
|
|
104
|
-
*/
|
|
105
|
-
"arc-
|
|
106
|
-
|
|
1
|
+
import { arcCapType, textAlignType, textBaselineType, lineCapType, lineJoinType } from './painterConfig'
|
|
2
|
+
|
|
3
|
+
export default interface CanvasConfigType {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 填充色或图案,默认"#000"
|
|
7
|
+
*/
|
|
8
|
+
fillStyle?: string | CanvasGradient
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 轮廓色或图案,默认"#000"
|
|
12
|
+
*/
|
|
13
|
+
strokeStyle?: string | CanvasGradient
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 线条宽度,默认1(单位px)
|
|
17
|
+
*/
|
|
18
|
+
lineWidth?: number
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 线的端点类型,默认"butt"平直边缘(还有"round"半圆和"square"矩形)
|
|
22
|
+
*/
|
|
23
|
+
lineCap?: lineCapType
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 线的拐角连接方式,默认"miter"连接处边缘延长相接(还有"bevel"对角线斜角和"round"圆)
|
|
27
|
+
*/
|
|
28
|
+
lineJoin?: lineJoinType
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
32
|
+
*
|
|
33
|
+
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
34
|
+
*/
|
|
35
|
+
lineDash?: Array<number>
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
39
|
+
*/
|
|
40
|
+
textAlign?: textAlignType
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
44
|
+
*/
|
|
45
|
+
textBaseline?: textBaselineType
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 阴影的模糊系数,默认0,也就是无阴影
|
|
49
|
+
*/
|
|
50
|
+
shadowBlur?: number
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 阴影的颜色
|
|
54
|
+
*/
|
|
55
|
+
shadowColor?: string | CanvasGradient
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 文字大小,默认16
|
|
59
|
+
*/
|
|
60
|
+
"fontSize"?: number
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 已废弃,向下兼容,请用 fontSize 代替
|
|
64
|
+
*/
|
|
65
|
+
"font-size"?: number // 向下兼容
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 字体,默认"sans-serif"
|
|
69
|
+
*/
|
|
70
|
+
"fontFamily"?: string
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 已废弃,向下兼容,请用 fontFamily 代替
|
|
74
|
+
*/
|
|
75
|
+
"font-family"?: string // 向下兼容
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 字重,默认400
|
|
79
|
+
*/
|
|
80
|
+
"fontWeight"?: number
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 已废弃,向下兼容,请用 fontWeight 代替
|
|
84
|
+
*/
|
|
85
|
+
"font-weight"?: number // 向下兼容
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 字类型,默认"normal"
|
|
89
|
+
*/
|
|
90
|
+
"fontStyle"?: string
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 已废弃,向下兼容,请用 fontStyle 代替
|
|
94
|
+
*/
|
|
95
|
+
"font-style"?: string // 向下兼容
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
99
|
+
*/
|
|
100
|
+
"arcStartCap"?: arcCapType
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 已废弃,向下兼容,请用 arcStartCap 代替
|
|
104
|
+
*/
|
|
105
|
+
"arc-start-cap"?: string // 向下兼容
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
109
|
+
*/
|
|
110
|
+
"arcEndCap"?: arcCapType
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 已废弃,向下兼容,请用 arcEndCap 代替
|
|
114
|
+
*/
|
|
115
|
+
"arc-end-cap"?: string // 向下兼容
|
|
116
|
+
|
|
107
117
|
}
|
package/types/SVGConfig.d.ts
CHANGED
|
@@ -1,80 +1,90 @@
|
|
|
1
|
-
import { arcCapType, textAlignType, textBaselineType } from './painterConfig'
|
|
2
|
-
|
|
3
|
-
export type svgElType = SVGElement | "g" | "text" | "path" | "circle" | "rect" | "polygon" | "polyline"
|
|
4
|
-
export type svgBoardType = SVGElement | "text" | "path" | "arc" | "circle" | "rect"
|
|
5
|
-
|
|
6
|
-
export default interface SVGConfigType {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 填充色或图案,默认"#000"
|
|
10
|
-
*/
|
|
11
|
-
fillStyle?: string
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 轮廓色或图案,默认"#000"
|
|
15
|
-
*/
|
|
16
|
-
strokeStyle?: string
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 线条宽度,默认1(单位px)
|
|
20
|
-
*/
|
|
21
|
-
lineWidth?: number
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
35
|
-
*
|
|
36
|
-
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
37
|
-
*/
|
|
38
|
-
lineDash?: Array<number>
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 已废弃,向下兼容,请用
|
|
57
|
-
*/
|
|
58
|
-
"font-
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 已废弃,向下兼容,请用
|
|
67
|
-
*/
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 已废弃,向下兼容,请用
|
|
77
|
-
*/
|
|
78
|
-
"arc-
|
|
79
|
-
|
|
1
|
+
import { arcCapType, textAlignType, textBaselineType, lineCapType, lineJoinType } from './painterConfig'
|
|
2
|
+
|
|
3
|
+
export type svgElType = SVGElement | "g" | "text" | "path" | "circle" | "rect" | "polygon" | "polyline"
|
|
4
|
+
export type svgBoardType = SVGElement | "text" | "path" | "arc" | "circle" | "rect"
|
|
5
|
+
|
|
6
|
+
export default interface SVGConfigType {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 填充色或图案,默认"#000"
|
|
10
|
+
*/
|
|
11
|
+
fillStyle?: string
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 轮廓色或图案,默认"#000"
|
|
15
|
+
*/
|
|
16
|
+
strokeStyle?: string
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 线条宽度,默认1(单位px)
|
|
20
|
+
*/
|
|
21
|
+
lineWidth?: number
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 线的端点类型,默认"butt"平直边缘(还有"round"半圆和"square"矩形)
|
|
25
|
+
*/
|
|
26
|
+
lineCap?: lineCapType
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 线的拐角连接方式,默认"miter"连接处边缘延长相接(还有"bevel"对角线斜角和"round"圆)
|
|
30
|
+
*/
|
|
31
|
+
lineJoin?: lineJoinType
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 设置线条虚线,默认为[]表示使用实线绘制
|
|
35
|
+
*
|
|
36
|
+
* 值应该是一个数组,格式:[实线长,虚线长,实线长 ...],数组长度任意,会自动循环
|
|
37
|
+
*/
|
|
38
|
+
lineDash?: Array<number>
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 文字水平对齐方式,默认"left"左对齐(还有"center"居中和"right"右对齐)
|
|
42
|
+
*/
|
|
43
|
+
textAlign?: textAlignType
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 文字垂直对齐方式,默认"middle"垂直居中(还有"top"上对齐和"bottom"下对齐)
|
|
47
|
+
*/
|
|
48
|
+
textBaseline?: textBaselineType
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 文字大小,默认16
|
|
52
|
+
*/
|
|
53
|
+
"fontSize"?: number
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 已废弃,向下兼容,请用 fontSize 代替
|
|
57
|
+
*/
|
|
58
|
+
"font-size"?: number // 向下兼容
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 字体,默认"sans-serif"
|
|
62
|
+
*/
|
|
63
|
+
"fontFamily"?: string
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 已废弃,向下兼容,请用 fontFamily 代替
|
|
67
|
+
*/
|
|
68
|
+
"font-family"?: string // 向下兼容
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 圆弧开始端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
72
|
+
*/
|
|
73
|
+
"arcStartCap"?: arcCapType
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 已废弃,向下兼容,请用 arcStartCap 代替
|
|
77
|
+
*/
|
|
78
|
+
"arc-start-cap"?: string // 向下兼容
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 圆弧结束端闭合方式,默认"butt"直线闭合(还有"round"圆帽闭合,"-round"反圆帽闭合)
|
|
82
|
+
*/
|
|
83
|
+
"arcEndCap"?: arcCapType
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 已废弃,向下兼容,请用 arcEndCap 代替
|
|
87
|
+
*/
|
|
88
|
+
"arc-end-cap"?: string // 向下兼容
|
|
89
|
+
|
|
80
90
|
}
|
package/types/animation.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
(deep: number): void
|
|
3
|
-
}
|
|
1
|
+
import { animationType } from "@oipage/core.js/src/animation"
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* 轮询动画,返回一个函数,调用该函数,可以提前结束动画
|
|
7
5
|
*/
|
|
8
|
-
export default
|
|
9
|
-
(doback: animationFun, duration?: number, callback?: animationFun): Function
|
|
10
|
-
}
|
|
6
|
+
export default animationType
|