Canvas Toolkit
← Class index

CWheelEvent

Events · extends CEvent

Event containing horizontal and vertical wheel scrolling deltas.

Module events/CWheelEvent.js. This class is available through the browser modules in the download.

Declared members

constructor(deltaX: number, deltaY: number, x?: number, y?: number, shiftKey?: boolean);

Creates a wheel event. @param deltaX Horizontal scroll delta. @param deltaY Vertical scroll delta. @param x Horizontal position relative to the receiving widget. @param y Vertical position relative to the receiving widget. @param shiftKey Whether Shift was held.

pos(): CPoint | null;

Position relative to the receiving widget, or null for legacy delta-only events.

shiftKey(): boolean;

Returns whether Shift was held during the wheel event.

deltaX(): number;

Returns the horizontal scroll delta.

deltaY(): number;

Returns the vertical scroll delta.