wealth/packages/island/src/organisms/lightbox/constants.ts

12 lines
565 B
TypeScript

/** The zoom buttons and a pinch step through these scales: ۱۰۰٪ → ۱۵۰٪ → ۲۰۰٪ → ۳۰۰٪. */
export const ZOOM_STEPS = [1, 1.5, 2, 3] as const;
/** How far (px) a pointer travels sideways before it counts as a swipe to the next image. */
export const SWIPE_THRESHOLD_PX = 48;
/** How far (px) a finger or pen drags down before letting go closes the viewer (C4 ۴.۳). */
export const SWIPE_CLOSE_PX = 96;
/** The black ground's opacity (%) once a drag down reaches `SWIPE_CLOSE_PX`; it fades from 100. */
export const SWIPE_CLOSE_GROUND = 70;