vislite 1.9.1 → 1.10.0

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,5 +1,15 @@
1
+ /**
2
+ * 绘图配置相关类型定义
3
+ * 定义了绘图相关的枚举类型
4
+ */
5
+
6
+ /** 圆弧端点类型 */
1
7
  export type arcCapType = "butt" | "round" | "-round"
8
+ /** 文字水平对齐方式 */
2
9
  export type textAlignType = "left" | "center" | "right"
10
+ /** 文字垂直对齐方式 */
3
11
  export type textBaselineType = "top" | "middle" | "bottom"
12
+ /** 线条端点类型 */
4
13
  export type lineCapType = "butt" | "round" | "square"
14
+ /** 线条连接方式 */
5
15
  export type lineJoinType = "miter" | "bevel" | "round"
package/types/rotate.d.ts CHANGED
@@ -1,6 +1,16 @@
1
1
  /**
2
- * 旋转
2
+ * 旋转变换函数类型定义
3
+ * 用于计算二维坐标系中的旋转变换
3
4
  */
4
5
  export default interface rotateType {
6
+ /**
7
+ * 计算旋转后的坐标
8
+ * @param cx 旋转中心的x坐标
9
+ * @param cy 旋转中心的y坐标
10
+ * @param deg 旋转角度(度)
11
+ * @param x 原始点的x坐标
12
+ * @param y 原始点的y坐标
13
+ * @returns 返回旋转后的坐标 [newX, newY]
14
+ */
5
15
  (cx: number, cy: number, deg: number, x: number, y: number): [number, number]
6
16
  }
package/types/ruler.d.ts CHANGED
@@ -1,11 +1,25 @@
1
+ /**
2
+ * 刻度尺配置选项类型定义
3
+ */
1
4
  export interface rulerOptionType {
5
+ /** 最大值限制 */
2
6
  max?: number
7
+ /** 最小值限制 */
3
8
  min?: number
4
9
  }
5
10
 
6
11
  /**
7
- * 刻度尺刻度运算,返回一个数组,表示刻度尺上应该显示的刻度
12
+ * 刻度尺计算函数类型定义
13
+ * 用于在给定范围内生成均匀的刻度值
8
14
  */
9
15
  export default interface rulerType {
16
+ /**
17
+ * 生成刻度值数组
18
+ * @param maxValue 数据最大值
19
+ * @param minValue 数据最小值
20
+ * @param num 期望的刻度数量
21
+ * @param option 可选的配置选项
22
+ * @returns 返回计算得到的刻度值数组
23
+ */
10
24
  (maxValue: number, minValue: number, num: number, option?: rulerOptionType): number[]
11
25
  }
package/types/scale.d.ts CHANGED
@@ -1,6 +1,16 @@
1
1
  /**
2
- * 缩放
2
+ * 缩放变换函数类型定义
3
+ * 用于计算二维坐标系中的缩放变换
3
4
  */
4
5
  export default interface scaleType {
6
+ /**
7
+ * 计算缩放后的坐标
8
+ * @param cx 缩放中心的x坐标
9
+ * @param cy 缩放中心的y坐标
10
+ * @param times 缩放倍数
11
+ * @param x 原始点的x坐标
12
+ * @param y 原始点的y坐标
13
+ * @returns 返回缩放后的坐标 [newX, newY]
14
+ */
5
15
  (cx: number, cy: number, times: number, x: number, y: number): [number, number]
6
16
  }
@@ -1,6 +1,7 @@
1
1
  import { throttleType } from "oipage/web/throttle/index"
2
2
 
3
3
  /**
4
- * 节流函数
4
+ * 节流函数类型定义
5
+ * 用于限制函数的执行频率,优化性能
5
6
  */
6
7
  export default throttleType