aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.ts')
-rw-r--r--src/lib.ts20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib.ts b/src/lib.ts
index bd81a8d..54dffc5 100644
--- a/src/lib.ts
+++ b/src/lib.ts
@@ -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 = {