@linker-design-plus/timeline-track 1.0.2 → 1.0.3

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.
@@ -15,10 +15,12 @@ export declare class Timeline {
15
15
  private onScrollChange;
16
16
  private animationFrameId;
17
17
  private isZooming;
18
+ private leftPadding;
18
19
  constructor(stage: Konva.Stage, gridLayer: Konva.Layer, config: Partial<TimelineConfig>, onTimeChange: (time: TimeMs) => void, onZoomChange: (zoom: number) => void, onScrollChange: (scrollLeft: number) => void);
19
20
  private initEventListeners;
20
21
  private handleZoom;
21
22
  private animateZoom;
23
+ private animateHorizontalScroll;
22
24
  private easeOutCubic;
23
25
  private handleClick;
24
26
  private pixelToTime;
@@ -18,3 +18,4 @@ export declare const TIME_SCALE: {
18
18
  MIN_HEIGHT: number;
19
19
  MAX_HEIGHT: number;
20
20
  };
21
+ export declare const TIMELINE_LEFT_PADDING = 15;
@@ -15,6 +15,7 @@ export declare class TimelineManager {
15
15
  private trackLayer;
16
16
  private playheadLayer;
17
17
  private selectionLayer;
18
+ private resizeObserver;
18
19
  private videoPreview;
19
20
  private isExecutingHistoryAction;
20
21
  private lastTrackDuration;
@@ -78,6 +79,12 @@ export declare class TimelineManager {
78
79
  getPlayState(): PlayState;
79
80
  setDuration(duration: TimeMs): void;
80
81
  getDuration(): TimeMs;
82
+ /**
83
+ * 调整时间轴大小以适配容器
84
+ * @param width 新的宽度
85
+ * @param height 新的高度
86
+ */
87
+ resize(width: number, height: number): void;
81
88
  /**
82
89
  * 滚动到指定时间
83
90
  * @param time 目标时间(毫秒)