UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

23 lines (22 loc) 855 B
import { BubblingEvent } from './BubblingEvent.js'; import type { Widget } from '../widgets/Widget.js'; /** * An event that is fired when a scrollable widget such as * {@link ScrollableViewportWidget} is scrolled. * * @category Event */ export declare class ScrollEvent extends BubblingEvent { static readonly type = "scroll"; readonly type: typeof ScrollEvent.type; readonly userCapturable: false; /** The new horizontal offset */ readonly offsetX: number; /** The new vertical offset */ readonly offsetY: number; /** How many pixels has the scroll offset changed by, horizontally? */ readonly deltaX: number; /** How many pixels has the scroll offset changed by, vertically? */ readonly deltaY: number; constructor(origin: Widget, offsetX: number, offsetY: number, deltaX: number, deltaY: number); }