diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-10-15 17:54:32 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-10-15 17:54:32 +1100 |
| commit | 8b77a42f313e6514a4634dcad988dd2fea6bdee6 (patch) | |
| tree | c092ceb1379f11edb43a19d6a7060a9fe743c77f /src/lib.ts | |
| parent | 48adb0e668d1118b6c5ef4a8bfb479ef10113813 (diff) | |
Pass TimeLine offsets to BaseLine
Add TimelineState
Diffstat (limited to 'src/lib.ts')
| -rw-r--r-- | src/lib.ts | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -268,10 +268,22 @@ export function getScaleRatio(scale: number, scale2: number){ } // For sending timeline-bound data to BaseLine -export type TimelineRange = { - id: number, - start: HistDate, - end: HistDate, +export class TimelineState { + id: number; + startDate: HistDate; + endDate: HistDate; + startOffset: number | null; + endOffset: number | null; + scaleIdx: number | null; + constructor(id: number, startDate: HistDate, endDate: HistDate, + startOffset: number | null = null, endOffset: number | null = null, scaleIdx: number | null = null){ + this.id = id; + this.startDate = startDate; + this.endDate = endDate; + this.startOffset = startOffset; + this.endOffset = endOffset; + this.scaleIdx = scaleIdx; + } }; export type HistEvent = { |
