UNPKG

@tempots/dom

Version:

Fully-typed frontend framework alternative to React and Angular

14 lines (13 loc) 581 B
import { Renderable } from '../types/domain'; import { InertiaConfig } from '../dom/inertia'; /** * A Tempo renderable that attaches inertia-based pointer drag handlers to * the parent element. On pointer up, the surface continues scrolling with * exponential velocity decay. * * @param onDelta - Called with `(dx, dy)` deltas each frame during drag and decay. * @param config - Optional friction and threshold settings. * @returns A renderable. * @public */ export declare const Inertia: (onDelta: (dx: number, dy: number) => void, config?: InertiaConfig) => Renderable;