chbim-time-axis-v2 0.0.18 → 0.0.191

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/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { default as CesiumGantt } from './components/CesiumGantt.vue';
2
+ import { ViewportRoam, RoamPoint } from './utils/viewportRoam';
2
3
 
3
- export { CesiumGantt };
4
+ export { CesiumGantt, ViewportRoam };
4
5
  export type { GanttTask, GanttGroup } from './components/types';
6
+ export type { RoamPoint };
5
7
  export default CesiumGantt;
@@ -9,6 +9,23 @@ export interface RoamPoint {
9
9
  roll?: number;
10
10
  time: string;
11
11
  }
12
+ interface GanttTaskLike {
13
+ id: string;
14
+ type: string;
15
+ children?: GanttTaskLike[];
16
+ startTime?: string;
17
+ endTime?: string;
18
+ attr?: {
19
+ roamData?: RoamPoint[];
20
+ };
21
+ blocks?: {
22
+ startTime: string;
23
+ endTime: string;
24
+ attr?: {
25
+ roamData?: RoamPoint[];
26
+ };
27
+ }[];
28
+ }
12
29
  export declare class ViewportRoam {
13
30
  private viewer;
14
31
  private positionProperty;
@@ -17,7 +34,19 @@ export declare class ViewportRoam {
17
34
  private rollProperty;
18
35
  private _onTick;
19
36
  private _isPlaying;
20
- constructor(viewer: Cesium.Viewer, data: RoamPoint[]);
37
+ private validIntervals;
38
+ constructor(viewer: Cesium.Viewer, data?: RoamPoint[] | GanttTaskLike[], intervals?: Cesium.TimeInterval[]);
39
+ /**
40
+ * 更新漫游数据
41
+ * @param data 漫游点列表或任务列表
42
+ * @param intervals 有效时间区间(仅当data为点列表时有效)
43
+ */
44
+ updateData(data: RoamPoint[] | GanttTaskLike[], intervals?: Cesium.TimeInterval[]): void;
45
+ private isRoamPointArray;
46
+ /**
47
+ * 解析任务列表,提取漫游点和时间区间
48
+ */
49
+ private parseTasks;
21
50
  private initData;
22
51
  /**
23
52
  * 开始跟随时间轴播放漫游
@@ -37,3 +66,4 @@ export declare class ViewportRoam {
37
66
  */
38
67
  destroy(): void;
39
68
  }
69
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chbim-time-axis-v2",
3
- "version": "0.0.18",
3
+ "version": "0.0.191",
4
4
  "description": "一个专为 Vue 3 设计的甘特图组件,完美集成 Cesium 时间轴功能。",
5
5
  "main": "dist/chbim-time-axis-v2.umd.js",
6
6
  "module": "dist/chbim-time-axis-v2.es.js",