From 6a46c220406477914c01a77c47016575aab8bdde Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Tue, 11 Oct 2022 00:34:42 +1100 Subject: Add global store, do general refactor Resolve typescript issues Make terminology more consistent --- src/lib.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib.ts') diff --git a/src/lib.ts b/src/lib.ts index 1e4b1f9..28994f1 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -5,3 +5,13 @@ export const MIN_DATE = -1000; export const MAX_DATE = 1000; export const SCALES = [200, 50, 10, 1, 0.2]; // Timeline gets divided into units of SCALES[0], then SCALES[1], etc + +export const WRITING_MODE_HORZ = + window.getComputedStyle(document.body)['writing-mode' as any].startsWith('horizontal'); + // Used with ResizeObserver callbacks, to determine which resized dimensions are width and height + +export type TimelineRange = { + id: number, + start: number, + end: number, +}; -- cgit v1.2.3