diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-15 12:25:08 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-15 12:25:08 +1100 |
| commit | 356ffa2250c66c442cfa8c4e638ca53926396a65 (patch) | |
| tree | cbfd3d2229df6a1b3c0e4837bcc7aff5c624c8a5 /src/lib.ts | |
| parent | e045f6461b5ceabb285b00fb9db0050a3d1f9d8d (diff) | |
Add visual indication of pan/zoom failure
Add tick display data to Tick objects
Add 'movement fail' divs
Add animateWithClass() utility function
Add animate-show-then-fade class
Diffstat (limited to 'src/lib.ts')
| -rw-r--r-- | src/lib.ts | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -59,6 +59,11 @@ export function getNumTrailingZeros(n: number): number { } throw new Error('Exceeded floating point precision'); } +export function animateWithClass(el: HTMLElement, className: string){ + el.classList.remove(className); + el.offsetWidth; // Triggers reflow + el.classList.add(className); +} // For calendar conversion (mostly copied from backend/hist_data/cal.py) export function gregorianToJdn(year: number, month: number, day: number): number { |
